[OpenSIPS-Users] xlog adding information to output
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Apr 12 16:02:12 EDT 2018
Hi Ben,
Yes, this change was done on purpose for logs consistency reasons. As
when you log via syslog you will get *all* the time the process name,
pid and data as suffix, we considered that printing to strerr should
follow the same model and have *all* the time the same prefix for the
messages.
Now, I guess you grep the logs by some sort of an application (before
having them pushed as jsons for later processing) - maybe you can do
some extra pre-processing the strip the prefix before parsing it as json.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
OpenSIPS Summit 2018
http://www.opensips.org/events/Summit-2018Amsterdam
On 04/06/2018 10:58 PM, Ben Newlin wrote:
>
> Hi,
>
> Yet another question. ☺
>
> We use the json module to structure our output to and then print using
> xlog. Our log consumer processes the json format and can process and
> index our logs.
>
> It appears that in 2.x the xlog module now always prepends a date
> string and the process number before every log. This is causing the
> logs to not be valid json format and they are not parsed properly by
> our consumer.
>
> I know that OpenSIPS’ internal logs always print in this format with
> the date and process number in front. Was this an intentional change
> to make xlog print this way as well? Can it be disabled in any way?
>
> I’m pretty sure I remember someone else asking about this not too long
> ago but I couldn’t find the thread in the archive.
>
> Thanks,
>
> Ben Newlin
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180412/83328165/attachment-0001.html>
More information about the Users
mailing list