|Summary:||ASTERISK-00581: [patch] /working/ syslog support ;)|
|Date Opened:||2003-11-27 03:23:14.000-0600||Date Closed:||2008-01-15 14:40:48.000-0600|
|Environment:||Attachments:||( 0) asterisk_syslog.diff|
( 1) logger.conf
|Description:||starting with the recently introduced syslog support,|
this patch makes a few changes.
First, all instances of LOG_* in the code are
replaced with AST_LOG_* so as to avoid namespace
collisions with the real syslog. This change is
global in scope and is why the patch is so big ;)
Second, the definitions of AST_LOG_* are made dependent
on the syslog versions.
Syslog logging is done if the severity is
greater than the configured minimum severity
in logger.conf -- analogous to syslogd itself.
Configuration documentation is in
****** ADDITIONAL INFORMATION ******
Tested, compiles cleanly, runs, works, doesn't
appear to break the old logging mechanism.
|Comments:||By: Brian West (bkw918) 2003-11-27 11:32:48.000-0600|
Good good ...Mine works....but you are right we need to fix that.
By: Mark Spencer (markster) 2003-11-30 22:24:04.000-0600
I really want to avoid redefining LOG_* as AST_LOG_*. Can we find a way to not redefine LOG_*?
By: ww (ww) 2003-11-30 23:08:20.000-0600
Maybe. I have an idea about how it might be done...
BUT, what are your feelings about replacing the existing logging
system wholesale and just using syslog? We duplicate a log of
syslogish functionality as it is, and it might be better not to
reinvent the wheel...
In that case -- and not worrying about backwards compatibility
of LOG_* as far as logger.c is concerned, it might be done with
some C preprocessor magic in logger.h, requiring no changes to
the existing code (other than logger.c of course) and preserving
the filename, line number formatting.
What do you think?
By: Mark Spencer (markster) 2003-11-30 23:11:14.000-0600
My feeling right now is I definitely want to retain normal logging. It makes it easy to have logging come on the asterisk console (eventually also to asterisk -r connections, maybe manager interface) and of course is also colorized.
By: ww (ww) 2003-12-01 21:17:23.000-0600
Ok, the new patch supports:
logging via syslog (syslog.local0 => debug in logger.conf)
with syslog semantics -- messages more serious than the configured
level are logged. levels come from sys/syslog.h for syslog logging.
logging to the console in colour as usual. all levels are masked
as before, there is no change in functionality here.
logging to remote consoles, possibly in colour.
logging to files directly is obsoleted.
the ignore directive is obsoleted.
ast_log is now a C preprocessor #define that calls ast_logger
and inserts the _A_ arguments to avoid the namespace conflict
asterisk.h -- reload_logger prototype changed since it doesn't
need an argument now -- it basically rereads the config and
reinitializes the syslog state and console logmask
asterisk.c -- minor changes, introduction of ast_console_puts
that sends a string to main and networked consoles.
logger.h -- LOG_* removed, ast_log redefined
logger.c -- ast_logger rewritten, various other supporting changes.
By: Brian West (bkw918) 2003-12-01 21:38:25.000-0600
but broken g729... not gewd!
By: ww (ww) 2003-12-01 22:51:25.000-0600
added logger-proprietary.c which can be linked with asterisk
so that evil proprietary binary old modules can still find the
By: ww (ww) 2003-12-01 22:52:11.000-0600
new version of logger patches that include a functional equivalent
of tclark's VERBOSE changes from bug ASTERISK-593
By: ww (ww) 2003-12-01 22:59:34.000-0600
patches had inverted truth test at the top of
ast_logger, corrected in the latest version of
By: ww (ww) 2004-01-06 18:57:15.000-0600
not sure if those patches still apply to -current cvs.
just uploaded new logger.c.patch and logger.h.patch
the RCSID macro may need to be removed...
By: zoa (zoa) 2004-01-09 18:58:21.000-0600
any updates on this ?
By: zoa (zoa) 2004-01-09 19:02:54.000-0600
This seems related to 0000466 and 0000599
By: ww (ww) 2004-01-11 20:28:42.000-0600
preserves old file logging and hence backwards
i am slightly unsure of the definition of the ast_log symbol
near the top of the file.
By: ww (ww) 2004-01-11 21:28:30.000-0600
ok, even more backwards compatibility!
numerical values for log levels stay the
By: Brian West (bkw918) 2004-01-11 23:26:55.000-0600
Fixed in CVS and doesn't break g729 w00t.
By: Digium Subversion (svnbot) 2008-01-15 14:40:48.000-0600
r1973 | markster | 2008-01-15 14:40:47 -0600 (Tue, 15 Jan 2008) | 2 lines
Add ww's improved syslog support (bug ASTERISK-581)