logger -> Syslog vs stdout

1,336 views
Skip to first unread message

Michael Klimenko

unread,
Jun 20, 2018, 9:02:33 PM6/20/18
to CGRateS
Hello Dan,
In order to monitor logs from cgr-engine, 
I am trying setting as follows :
      "logger":"*syslog",                                                                             // controls the destination of logs <*syslog|*stdout>
     
"log_level": 7,                                                                                 // control the level of messages logged (0-emerg to 7-debug)

In my /var/log/syslog, I can only see partial warnings/errors, not exactly as it appears in stdout.
Is there a difference between *stdout and *syslog ? 
How do I achieve log output to syslog, similar to the one,  that appears when running cgr-engine in the console (stdout) ?
 
Thanks,
Michael

DanB

unread,
Jun 21, 2018, 4:15:44 AM6/21/18
to cgr...@googlegroups.com
Hey Michael,

The difference between them would be that in case of syslog, it will be
syslog deciding how much goes into logs (normally if message is too big
it will be cut, if message is considered to be duplicated it will be
discarded and so on).

In case of stdout, we print all, so no formatting nor altering is done.
If you want to go for stdout you should be fine if you use the logging
facility of systemd, you can end up with them managing the stdout.

DanB
> --
> You received this message because you are subscribed to the Google
> Groups "CGRateS" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to cgrates+u...@googlegroups.com.
> To post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/c472b0ee-f52d-4549-98e4-115625f24fbe%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

Michael Klimenko

unread,
Jun 25, 2018, 11:53:48 AM6/25/18
to CGRateS
Dan,
Trying to set logger to *stdout in the config... 
But, cannot find the location where the log is written :(

has that something to do with journalctl -u cgrates.service ?

Thanks,
Michael

DanB

unread,
Jun 25, 2018, 11:56:44 AM6/25/18
to cgr...@googlegroups.com
Michael,

I guess so, I am not sure where your stdout goes but normally it should
depend on the init script.

DanB
> msgid/cgrates/ec09d0ce-3a7d-47fc-a8ad-3ec8e4d5cfb2%40googlegroups.com
Reply all
Reply to author
Forward
0 new messages