[asterisk-dev] Asterisk log format

Andrea Spadaccini a.spadaccini at mediatechnologies.it
Sat Dec 23 17:16:16 MST 2006


Ciao Russell,

> > TIME DATE LEVEL[PID] FILENAME: ERROR_TEXT
> 
> Yes.  However, there is an option to disable timestamps in the logs,
> but I can't imagine any reason people would want to do that.

Ok, maybe I'll add an option somewhere.
Is the date/time locale-dependant?

> > but sometimes this line has a dot as the first character, and
> > sometimes there's just
> >   -- sometext
> 
> I have no idea why a log message would begin with a dot.  Can you
> provide an example?

I'll do more, I spotted the bug (if we can talk of a bug :D).
chan_sip.c, rows 10876 and 10880 (Asterisk 1.2.13)

ast_log(LOG_DEBUG, "Received bye, issuing owner hangup\n.");
ast_log(LOG_DEBUG, "Received bye, no owner, selfdestruct soon.\n.");

> Also, lines beginning with " -- sometext" look like the types of
> "verbose" messages shown on the console.

Yes, I know.

> However, when verbose
> messages go to the log files, they should follow the same format as
> other messages, with a type of VERBOSE.  So, if you have examples of
> those, we can look at those, too.

Well, they can be found in verbose.log. An example is:
    -- Saved useragent "Grandstream GXP2000 1.1.0.14" for peer 452
I think that the problem is in the ast_verbose() function, because that
string is printed by chan_sip.c:6097.

Moreover all the messages produced by "sip debug" do not follow that
format.

Thanks for your kind help,

-- 
Andrea Spadaccini
Multimedia Technologies Institute s.r.l.


More information about the asterisk-dev mailing list