# lcmlog-server Server side of a tool for reading and writing the lcm staff logs. The program doesn't accept any command line options. **For the test session, only the account `log` can access.** ## The two kind of logs Admins and 150 logs. _To do_ ## The authentication process In the main directory there is a folder named `auth` that contain the following files: * UPDATE * 150/ * GET * POST * Admin/ * GET * POST Every file contain the list of the euid of the users that can send and request logs and update the database. Now there is only the euid of the `log` account. If you want to add a new user, you have to add his euid in these files. ## The three methods The first line is always the name of the method and can be only `GET`, `POST` or `UPDATE`. ### GET The `GET` method is used to print all the logs that meet the required criteria. * The second line of the input is the kind of the 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 for date are printed. The format for the date has not been decided yet, so currently any string can be inserted here. * 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. ### POST The `POST` method is used to add a log to the database. * The second line of the input is the kind (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. ### UPDATE 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. ## The format of the log files _To do_