Skip to content

REMP Tracker and Segments - Log errors to the right channel #42

Description

@Andre-Amaro-Matias

Description

The REMP Segment and Tracker modules are logging both error and info messages to the same file (using the same facility), which makes debugging and error checking almost impossible, due to the verbosity of the info messages.

What is happening

  1. Using /var/log/messages (syslog dafault location) for log lines from segments and tracker;
  2. Both INFO and ERROR severities are logged to this log file.

Impact of this issue

Right now, we've changed the start-up script to log STDOUT to a file and STDERR to another. Problem is, the application logs are being written to STDERR only, even when it's an info message.
Because of this, we have the following logfiles:

[PROD] [root@REMP ~] $ ls -alkhtr /var/log/tracker/
total 849M
-rw-r--r--   1 nginx nginx    0 Oct 25 17:40 tracker.out
-rw-r--r--   1 nginx nginx 116M Nov 21 00:01 tracker.err-20191121.gz
-rw-r--r--   1 nginx nginx 132M Nov 22 00:01 tracker.err-20191122.gz
-rw-r--r--   1 nginx nginx  91M Nov 23 00:01 tracker.err-20191123.gz
-rw-r--r--   1 nginx nginx  57M Nov 24 00:01 tracker.err-20191124.gz
-rw-r--r--   1 nginx nginx 298M Nov 25 00:01 tracker.err-20191125
drwxr-xr-x   2 nginx nginx  196 Nov 25 00:01 .
drwxr-xr-x. 20 root  root  4.0K Nov 25 01:01 ..
-rw-r--r--   1 nginx nginx 112M Nov 25 11:47 tracker.err

What should be happening

There should be an application-wide configuration to output the messages (info) and the errors (warning,error,etc.) to different locations. Additionally, logging should follow the user's preferences when it comes to the minimum severity to which log to file.

  1. There could be a conf file to specify a file path to the desired location.
  2. There could be an option in the conf file to select the desired loglevel of the messages to write to file.

Version used
https://github.com/remp2020/remp/tree/0.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions