Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Logging

rezamalik edited this page Nov 13, 2019 · 1 revision

This article contains logging instructions for developers.

1. Log types

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.

2. Location

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.

3. Filenames

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.

4. Log format

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.

Clone this wiki locally