[asterisk-dev] [svn-commits at lists.digium.com: [svn-commits] dhubbard: branch 1.4 r112689 - /branches/1.4/main/asterisk.c]

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Apr 7 17:06:47 CDT 2008


On Mon, Apr 07, 2008 at 02:44:31PM -0700, Daniel Hazelbaker wrote:
> On Apr 5, 2008, at 9:09 PM, Tzafrir Cohen wrote:
> 
> > Asterisk does provide an extensive lgging facility. Have you niticed
> > where that code is added? right after initializing the logger, in  
> > order
> > to get those messages logged.
> >
> > With th default configuration of Asterisk, /var/log/asterisk/ 
> > messages is
> > a handy tool for debugging error.
> >
> > On my system the mailer has a separate mail.log, mail.warn and  
> > mail.err
> > log files. You can easily do the same with asterisk with trivial
> > logger.conf config lines:
> >
> > # the default:
> > messages => error,warning,notice
> >
> > # Add those:
> > warn    => error,warning
> > err     => error
> 
> Yes, but unless I am missing something, none of those logging  
> facilities goes to the startup console or the "linux text  
> console" (i.e. the place messages like "/dev/hda I/O error" to spat  
> out to).  When I run 'service asterisk start' I get no indication that  
> massive parts of my configuration may not work.  I could have a  
> complete failure in my SIP, IAX and Zaptel (such as kernel modules not  
> loading) configuration and never know it until somebody complains that  
> they can't dial.

I figure you have missed something. In logger.conf:

syslog.local0 => notice,warning,error


But then again, Asterisk is not the only program with its personal
logging facility. Apache and Samba come to mind.

> 
> The asterisk startup script happily reports "[SUCCESS]" (or other  
> message depending on distro) and you never see a message unless you go  
> look at the log file.  

Right. Those problems occour way after forking into background.

> Right now I am sure you could do it via syslog,  
> but I have a hard enough time figuring out "normal" syslog usage.  And  
> I don't want my console spammed every time Asterisk has an "error",  
> just at startup.
> 
> > One might say that some of Asterisk's error messages are mis-labeled.
> > I'm sure that after using Asterisk with such a log file you'll be able
> > to file a number of useful bug reports.
> 
> I would agree with that.  I find it highly annoying that Asterisk  
> considers the fact that I did not turn off the meetme module at  
> compile time and do not have a meetme.conf configuration file it's  
> highest error code.  I don't suppose there would be an easy way to  
> "map" log messages to a different error-code level so I can elevate  
> certain error messages and de-elevate others without keeping a custom  
> patch around?

What is the exact problem here?

If there is no config file, should the meetme module just silently fail?
How will you be able to diagnose this later on?

BTW: instead of editing such a map file, you could also edit
modules.conf and set 'unload => app_meetme.so'

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list