Quantcast

opensips logging format

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

opensips logging format

Ramachandran, Agalya (Contractor)

Hi Bogdan/team,

 

I have couple of  questions regarding the logging format for OpenSIPS logs.

 

1)      Is it possible to include milliseconds in the time stamp. Currently it is displaying till seconds ( Apr 18 15:05:53 ).

2)      Is it possible to log in standard ISO format such as "2017-04-18T15:05:53.0005" instead of “Apr 18 15:05:53”

 

If there is a way to achieve the above two, let me know any configs to be added or so.

 

Regards,

Agalya


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opensips logging format

Benjamin Cropley
https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc87 and https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc91 should be able to help

For example...

xlog("L_DBG","$time(%b-%d_%H-%M-%S).$Tsm");

All the best,
Ben Cropley

On Wed, Apr 19, 2017 at 3:59 PM, Ramachandran, Agalya (Contractor) <[hidden email]> wrote:

Hi Bogdan/team,

 

I have couple of  questions regarding the logging format for OpenSIPS logs.

 

1)      Is it possible to include milliseconds in the time stamp. Currently it is displaying till seconds ( Apr 18 15:05:53 ).

2)      Is it possible to log in standard ISO format such as "2017-04-18T15:05:53.0005" instead of “Apr 18 15:05:53”

 

If there is a way to achieve the above two, let me know any configs to be added or so.

 

Regards,

Agalya


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
All the best,
Ben Cropley
07539 366 905

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opensips logging format

Bogdan-Andrei Iancu-2
As an extra note here . When logging via syslog, the time and pid part are formated by syslog itself. When logging to stderr, opensips emulates the syslog formating for consistency reasons.

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/19/2017 05:36 PM, Benjamin Cropley wrote:
https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc87 and https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc91 should be able to help

For example...

xlog("L_DBG","$time(%b-%d_%H-%M-%S).$Tsm");

All the best,
Ben Cropley

On Wed, Apr 19, 2017 at 3:59 PM, Ramachandran, Agalya (Contractor) <[hidden email]> wrote:

Hi Bogdan/team,

 

I have couple of  questions regarding the logging format for OpenSIPS logs.

 

1)      Is it possible to include milliseconds in the time stamp. Currently it is displaying till seconds ( Apr 18 15:05:53 ).

2)      Is it possible to log in standard ISO format such as "2017-04-18T15:05:53.0005" instead of “Apr 18 15:05:53”

 

If there is a way to achieve the above two, let me know any configs to be added or so.

 

Regards,

Agalya


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
All the best,
Ben Cropley
07539 366 905


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opensips logging format

Ramachandran, Agalya (Contractor)

Got it. Meaning, we can customize few logs from config file for xlog().

But any INFO/DEBUG(LM_INFO/LM_DBG) logs from source code, cannot be modified. It will be logged via syslog format.

Is my understand right?

 

Regards,
Agalya

 

From: Users [mailto:[hidden email]] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, April 21, 2017 4:22 AM
To: OpenSIPS users mailling list <[hidden email]>
Subject: Re: [OpenSIPS-Users] opensips logging format

 

As an extra note here . When logging via syslog, the time and pid part are formated by syslog itself. When logging to stderr, opensips emulates the syslog formating for consistency reasons.

Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
 
OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/19/2017 05:36 PM, Benjamin Cropley wrote:

https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc87 and https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc91 should be able to help

 

For example...

 

xlog("L_DBG","$time(%b-%d_%H-%M-%S).$Tsm");

 

All the best,

Ben Cropley

 

On Wed, Apr 19, 2017 at 3:59 PM, Ramachandran, Agalya (Contractor) <[hidden email]> wrote:

Hi Bogdan/team,

 

I have couple of  questions regarding the logging format for OpenSIPS logs.

 

1)      Is it possible to include milliseconds in the time stamp. Currently it is displaying till seconds ( Apr 18 15:05:53 ).

2)      Is it possible to log in standard ISO format such as "2017-04-18T15:05:53.0005" instead of “Apr 18 15:05:53”

 

If there is a way to achieve the above two, let me know any configs to be added or so.

 

Regards,

Agalya


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 

--

All the best,

Ben Cropley

07539 366 905




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opensips logging format

Bogdan-Andrei Iancu-2
Hi Agalya,

Indeed, the logs generated from inner C code cannot be changes. The logs from script (via xlog) can be formated as content, nevertheless the prefix part (time, process, etc) is fixed.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 05/08/2017 06:23 PM, Ramachandran, Agalya (Contractor) wrote:

Got it. Meaning, we can customize few logs from config file for xlog().

But any INFO/DEBUG(LM_INFO/LM_DBG) logs from source code, cannot be modified. It will be logged via syslog format.

Is my understand right?

 

Regards,
Agalya

 

From: Users [[hidden email]] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, April 21, 2017 4:22 AM
To: OpenSIPS users mailling list [hidden email]
Subject: Re: [OpenSIPS-Users] opensips logging format

 

As an extra note here . When logging via syslog, the time and pid part are formated by syslog itself. When logging to stderr, opensips emulates the syslog formating for consistency reasons.

Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
 
OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/19/2017 05:36 PM, Benjamin Cropley wrote:

https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc87 and https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc91 should be able to help

 

For example...

 

xlog("L_DBG","$time(%b-%d_%H-%M-%S).$Tsm");

 

All the best,

Ben Cropley

 

On Wed, Apr 19, 2017 at 3:59 PM, Ramachandran, Agalya (Contractor) <[hidden email]> wrote:

Hi Bogdan/team,

 

I have couple of  questions regarding the logging format for OpenSIPS logs.

 

1)      Is it possible to include milliseconds in the time stamp. Currently it is displaying till seconds ( Apr 18 15:05:53 ).

2)      Is it possible to log in standard ISO format such as "2017-04-18T15:05:53.0005" instead of “Apr 18 15:05:53”

 

If there is a way to achieve the above two, let me know any configs to be added or so.

 

Regards,

Agalya


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 

--

All the best,

Ben Cropley

07539 366 905




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opensips logging format

Ramachandran, Agalya (Contractor)

Thank you Bogdan. Got it.

 

Regards,
Agalya

From: Bogdan-Andrei Iancu [mailto:[hidden email]]
Sent: Tuesday, May 09, 2017 9:34 AM
To: OpenSIPS users mailling list <[hidden email]>; Ramachandran, Agalya (Contractor) <[hidden email]>
Subject: Re: [OpenSIPS-Users] opensips logging format

 

Hi Agalya,

Indeed, the logs generated from inner C code cannot be changes. The logs from script (via xlog) can be formated as content, nevertheless the prefix part (time, process, etc) is fixed.

Best regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
 
OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 05/08/2017 06:23 PM, Ramachandran, Agalya (Contractor) wrote:

Got it. Meaning, we can customize few logs from config file for xlog().

But any INFO/DEBUG(LM_INFO/LM_DBG) logs from source code, cannot be modified. It will be logged via syslog format.

Is my understand right?

 

Regards,
Agalya

 

From: Users [[hidden email]] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, April 21, 2017 4:22 AM
To: OpenSIPS users mailling list [hidden email]
Subject: Re: [OpenSIPS-Users] opensips logging format

 

As an extra note here . When logging via syslog, the time and pid part are formated by syslog itself. When logging to stderr, opensips emulates the syslog formating for consistency reasons.

Regards,


Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
 
OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/19/2017 05:36 PM, Benjamin Cropley wrote:

https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc87 and https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc91 should be able to help

 

For example...

 

xlog("L_DBG","$time(%b-%d_%H-%M-%S).$Tsm");

 

All the best,

Ben Cropley

 

On Wed, Apr 19, 2017 at 3:59 PM, Ramachandran, Agalya (Contractor) <[hidden email]> wrote:

Hi Bogdan/team,

 

I have couple of  questions regarding the logging format for OpenSIPS logs.

 

1)      Is it possible to include milliseconds in the time stamp. Currently it is displaying till seconds ( Apr 18 15:05:53 ).

2)      Is it possible to log in standard ISO format such as "2017-04-18T15:05:53.0005" instead of “Apr 18 15:05:53”

 

If there is a way to achieve the above two, let me know any configs to be added or so.

 

Regards,

Agalya


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 

--

All the best,

Ben Cropley

07539 366 905





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Loading...