The log file generated is named forensic-[DATE].log
The category corresponding to forensic events is org.ametys.core.trace.ForensicLogger
The category must be configured with the INFO log level.
Forensic logs can become very unwieldy very quickly, so make sure you target the tracking you want and, if necessary, set up a rotating log to automatically delete old logs.
Event categories
Events can be restricted to one or more event sub-categories.
For example, if you want to enable tracking of user events that only concern login/logout and account creation/modification, you'll enable only the categories:
These categories themselves have sub-categories that can be targeted in specific ways. For example: - to track only failed login attempts, activate the org.ametys.core.trace.ForensicLogger.authentication.form.failed category - to track only page deletions, activate the org.ametys.core.trace.ForensicLogger.page.deleted category .
Log format
For each event, a line in the log file is generated in the following format:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
date/heure INFO (url) [IP] [login#population] event.id (arg1::value1|arg2::value2|...) (header1::value1|header2::value2|...)
date/heure INFO (url) [IP] [login#population] event.id (arg1::value1|arg2::value2|...) (header1::value1|header2::value2|...)
date/heure INFO (url) [IP] [login#population] event.id (arg1::value1|arg2::value2|...) (header1::value1|header2::value2|...)
In order of appearance:
date and time of event
log level
url in brackets
IP address in square brackets
the identifier of the user responsible for the event between brackets
event identifier
event-related arguments, enclosed in brackets and separated by |.
http request headers, enclosed in brackets and separated by |.
Examples:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
2022-11-18 17:11:27,056 INFO (http-nio-8080-exec-1;/catalog/_authenticate) [192.168.0.18] [admin#ametys_demo_users] authentication.login (user::UserIdentity [login=admin, population=ametys_demo_users]|credential-provider::org.ametys.core.authentication.FormBased) (host::localhost:8080|origin::http://localhost:8080|user-agent::Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36|referer::http://localhost:8080/catalog/_authenticate?requestedURL=/catalog/fr/index.html)
2022-11-18 17:11:27,056 INFO (http-nio-8080-exec-1;/catalog/_authenticate) [192.168.0.18] [admin#ametys_demo_users] authentication.login (user::UserIdentity [login=admin, population=ametys_demo_users]|credential-provider::org.ametys.core.authentication.FormBased) (host::localhost:8080|origin::http://localhost:8080|user-agent::Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36|referer::http://localhost:8080/catalog/_authenticate?requestedURL=/catalog/fr/index.html)
2022-11-18 17:11:27,056 INFO (http-nio-8080-exec-1;/catalog/_authenticate) [192.168.0.18] [admin#ametys_demo_users] authentication.login (user::UserIdentity [login=admin, population=ametys_demo_users]|credential-provider::org.ametys.core.authentication.FormBased) (host::localhost:8080|origin::http://localhost:8080|user-agent::Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36|referer::http://localhost:8080/catalog/_authenticate?requestedURL=/catalog/fr/index.html)
Oops!
Copy to clipboard failed. Open the code and copy it manually.
2022-11-18 17:13:53,869 INFO (http-nio-8080-exec-4;/cms/generate/catalog/fr/mot-de-passe.html) [0:0:0:0:0:0:0:1] [admin#ametys_demo_users] account.password.change (population::ametys_demo_users|login::admin|site::catalog) (origin::http://localhost:8080|user-agent::Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36|referer::http://localhost:8080/catalog/fr/mot-de-passe.html?login=admin&population=ametys_demo_users&token=60331b26ce1b44cf9af633b87c7d009d|host::localhost:8080)
2022-11-18 17:13:53,869 INFO (http-nio-8080-exec-4;/cms/generate/catalog/fr/mot-de-passe.html) [0:0:0:0:0:0:0:1] [admin#ametys_demo_users] account.password.change (population::ametys_demo_users|login::admin|site::catalog) (origin::http://localhost:8080|user-agent::Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36|referer::http://localhost:8080/catalog/fr/mot-de-passe.html?login=admin&population=ametys_demo_users&token=60331b26ce1b44cf9af633b87c7d009d|host::localhost:8080)
2022-11-18 17:13:53,869 INFO (http-nio-8080-exec-4;/cms/generate/catalog/fr/mot-de-passe.html) [0:0:0:0:0:0:0:1] [admin#ametys_demo_users] account.password.change (population::ametys_demo_users|login::admin|site::catalog) (origin::http://localhost:8080|user-agent::Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36|referer::http://localhost:8080/catalog/fr/mot-de-passe.html?login=admin&population=ametys_demo_users&token=60331b26ce1b44cf9af633b87c7d009d|host::localhost:8080)