On Wed, 3 Jun 2020, Fourhundred Thecat wrote:>> On 2020-06-03 12:18, Tony Mountifield wrote: >> In article <88f96e46-e6bb-a7ef-bebb-5588ef6cd6c1 at gmx.ch>, >> >> However, the conversation would then be: should both logging types include >> line number and function? should both logging types omit them? should >> it be a configuration option in logger.conf whether they include or omit? >> if so, what should the default be, if not specified in logger.conf? > > that's easy! > > log level should be configurable in config file, not hardcoded. > > Logging debugging info in production environment is madness.How about: syslog.local0 = error,verbose,warning no debugging detail. syslog.local0 = debug,error,verbose,warning include debugging detail. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281
Fourhundred Thecat
2020-Jun-03 18:01 UTC
[asterisk-users] problem with logger: syslog vs. file
> On 2020-06-03 17:21, Steve Edwards wrote: > > How about: > > syslog.local0 = error,verbose,warning > > no debugging detail. > > syslog.local0 = debug,error,verbose,warning > > include debugging detail.currently, the above has no effect on logging. As I have shown in the code snippet in my previous email, the log format is hardcoded (main/logger.c:372) In other words, if you are logging through syslog, you will get debugging garbage regardless what you have in /etc/asterisk/logger.conf
On Wed, 3 Jun 2020, Fourhundred Thecat wrote:>> On 2020-06-03 17:21, Steve Edwards wrote: >> >> How about: >> >> syslog.local0 = error,verbose,warning >> >> no debugging detail. >> >> syslog.local0 = debug,error,verbose,warning >> >> include debugging detail. > > currently, the above has no effect on logging.Sorry. I guess I wasn't clear. I wasn't implying that the feature had already been implemented. I was replying to Tony's question 'should it be a configuration option in logger.conf whether they include or omit? if so, what should the default be, if not specified in logger.conf?' I'm suggesting that if the 'debug' log level is specified, the debug detail (function name and line) should be included. Otherwise, not. The 'debug' log level is 'already there' and it seems reasonable to me that if I'm deep enough into logging that I want debug level log messages that I'm probably also interested in logging debug details. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281