No Description

Alessandro De Gennaro ee6250f9bb Merge branch 'develop' of lcmstaff/lcmlog-server into master 9 months ago
.gitignore 151e2b84b2 Update .gitignore 1 year ago
LICENSE d490516589 Initial commit 1 year ago fbbd77b80d Update '' 1 year ago
auth.toml b7c5579a2f Implemented new authorization using toml 1 year ago
lcmlog-server c59e727902 Correct tab spacing 10 months ago
lcmlog-server-utils aa62f49c5f Removed logfile ACL control 1 year ago


Server side of a tool for reading and writing the lcm staff logs.

  • lcmlog-server: main script
  • lcmlog-server-utils: utility script

Input pipeline

The first line is always the name of the method and can be only GET, POST or UPDATE.


The GET method is used to print all the logs that meet the required criteria.

  • The second line of the input is the type of log to search for (see below), and it is the only mandatory parameter.
  • The third line is the date: only logs whose date contains the searched date are printed.
  • The fourth line is a list of comma separated tags to search for.
  • The fifth line is the name of the user to search for.


The POST method is used to add a log to the database.

  • The second line of the input is the type (se below).
  • The third one is the date.
  • The fourth one is a list of comma separated tags.
  • The remainder of the file (until EOF is met) is the content of the log.


The UPDATE method is used to regenerate the internal server database. It should only be called if a log file is added by hand, or if some of the log files get renamed or corrupted. It assumes that all the log files are correctly formatted.

Authentication groups

There are four authentication groups with the following privileges:

  • 150: GET 150, GET Admin and POST 150.
  • Admin: GET 150, GET Admin, POST 150, POST Admin and UPDATE.
  • Nirvana (ex admin): GET 150, GET Admin and POST Admin.
  • Valhalla (ex 150): GET 150 and GET Admin.

Initialize the environment

The default directory is /var/local/log/lcmlog-data.

1) Initialization of the folder structure

Initialize the environment using lcmlog-server-utils -i. The structure is:

  • auth
    • auth.toml
    • 150
    • Admin
    • Nirvana
    • Valhalla
  • data
    • .data
  • logs
    • logfile

2) Add users in authentication groups

Edit files in auth folder for add users in a group. The format of a row is:

UID   username

3) Update ACL

Authentication for read/write is based upon the access control list. To update ACL after every changes in the auth folder, use lcmlog-server-utils -u.

Manage the environment

  • You can lookup authorizations using lcmlog-server-utils -l.

  • You can change authorizations by editing files in auth folder and then using lcmlog-server-utils -u to update ACL.

  • You can change the default privileges of an authentication groups by editing the auth/auth.toml file:


    The available privileges are: GET 150, GET Admin, POST 150, POST Admin and UPDATE. No further action is needed after editing this file.