-
Notifications
You must be signed in to change notification settings - Fork 7
Logging
This article contains logging instructions for developers.
There are two different logs that should be created:
a. audit logs: They should record all transactions carried out by the application.
b. exception logs: They should record errors and exceptions that took place while the application was running.
Logs should be saved to /opt/csplogs/
For dev purposes, create the directory locally. When deployed, this directory will be mounted to the docker image from the host but this does not concern the developers.
Log filenames should adhere to the following format <application>-<type>.log eg. trustcircles-exc.log or openam-aud.log where type can be "exc" for exception logs and "aud" for audit logs.
Logs should be in a legacy syslog format as follows: DateTime (Mmm DD HH:MM:SS) [SPACE] Host name [SPACE] Message text (PID tag followed by message content)
Example Jul 17 22:04:25 csp1.mycsirt.xyz trustcirclesd[2746]: this is the main message content
The main message should contain the following info: userid, messagetext *userid when applicable. "system" when no userid available.
Example Jul 17 22:04:25 csp1.mycsirt.xyz trustcirclesd[2746]: user555, Error connecting to database.