Hypertopic / Cassandre

Diary for qualitative analysis
https://hypertopic.org/cassandre
GNU Affero General Public License v3.0
25 stars 7 forks source link

Logging format should be usable for production. #121

Closed benel closed 2 years ago

benel commented 2 years ago

Recent requests for usage statistics as well as the frequent need for stress tuning make me realize that Cassandre (and other software from the suite) requires extensive logs by default.

Here is how the new format is loaded in a a spreadsheet software (with space as the column separator, double quote as a group formatter, and defining the correct type for time columns):

Capture d’écran 2022-09-25 à 15 47 10

Note: Data are from the AAAforREST test suite (in normal settings, the last column is the browser).

Please note that this setting requires AAAforREST to be updated with docker-compose pull (and down and up).

christophe-lejeune commented 2 years ago

Thank you, very much, @benel for this additional contribution to Cassandre source code!

As you have seen, your contribution was merged in the master branch.

There is indeed no doubt that these extensive logs will indeed help a lot. May I suggest that you indicate here where the resulting logs are stored and how the server admin can access it ?

Again, many thanks ! Christophe

benel commented 2 years ago

May I suggest that you indicate here where the resulting logs are stored and how the server admin can access it ?

Docker logs are stored in /var/lib/docker/containers/{ID}. But you rarely have to access the "real" files.

Logs can be easily accessed with the command docker-compose logs {ID} (see documentation for options) with ID being ldap_proxy in this case.

"Piped" with grep and wc -l, it is possible to query the data and get basic but meaningful usage statistics.

Many options are available for docker logs to rotate logs, centralize them on a server, etc.