aboutsummaryrefslogtreecommitdiffstats
path: root/main/logger.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-10Merged revisions 269636 via svnmerge from tilghman1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r269636 | tilghman | 2010-06-10 03:15:45 -0500 (Thu, 10 Jun 2010) | 16 lines Merged revisions 269635 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r269635 | tilghman | 2010-06-10 02:52:34 -0500 (Thu, 10 Jun 2010) | 9 lines Ensure restartable system calls can restart (BSD signal semantics) This eliminates the annoying <beep> on the console. (closes issue #17477) Reported by: jvandal Patches: 20100610__issue17477.diff.txt uploaded by tilghman (license 14) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@269637 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-04Get rid of warning when the console is configured without logger levelsrussell1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@268204 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-26Merged revisions 266146 via svnmerge from tilghman1-3/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r266146 | tilghman | 2010-05-26 16:17:46 -0500 (Wed, 26 May 2010) | 21 lines Merged revisions 266142 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r266142 | tilghman | 2010-05-26 16:11:44 -0500 (Wed, 26 May 2010) | 14 lines Use sigaction for signals which should persist past the initial trigger, not signal. If you call signal() in a Solaris signal handler, instead of just resetting the signal handler, it causes the signal to refire, because the signal is not marked as handled prior to the signal handler being called. This effectively causes Solaris to immediately exceed the threadstack in recursive signal handlers and crash. (closes issue #17000) Reported by: rmcgilvr Patches: 20100526__issue17000.diff.txt uploaded by tilghman (license 14) Tested by: rmcgilvr ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@266154 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-12Merged revisions 256821 via svnmerge from lmadsen1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r256821 | lmadsen | 2010-04-12 09:39:37 -0500 (Mon, 12 Apr 2010) | 8 lines CLI command logger set level auto complete. A simple patch to enable auto tab complete. (closes issue #17152) Reported by: pabelanger Patches: 0017152.patch uploaded by pabelanger (license 224) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@256822 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-24Merged revisions 248584 via svnmerge from tilghman1-3/+4
https://origsvn.digium.com/svn/asterisk/trunk ................ r248584 | tilghman | 2010-02-24 15:17:26 -0600 (Wed, 24 Feb 2010) | 14 lines Merged revisions 248582 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r248582 | tilghman | 2010-02-24 15:02:18 -0600 (Wed, 24 Feb 2010) | 7 lines Remove color code sequences from verbose messages that go to logfiles. (closes issue #16786) Reported by: dodo Patches: logger2.patch uploaded by dodo (license 989) Tested by: tilghman ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@248643 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-02Merged revisions 221920 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r221920 | tilghman | 2009-10-01 22:04:34 -0500 (Thu, 01 Oct 2009) | 4 lines Initialize a variable that we check immediately upon startup. (closes issue #15973) Reported by: atis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@221923 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-17Merged revisions 212574 via svnmerge from seanbright1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r212574 | seanbright | 2009-08-17 14:18:16 -0400 (Mon, 17 Aug 2009) | 8 lines Correct the return value check for ast_safe_system. The logic here was reversed as ast_safe_system returns -1 on error and not on success. Fix suggested by reporter. (closes issue #15667) Reported by: loic ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@212580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-08Merged revisions 193194 via svnmerge from kpfleming1-10/+4
https://origsvn.digium.com/svn/asterisk/trunk ................ r193194 | kpfleming | 2009-05-08 09:06:15 -0500 (Fri, 08 May 2009) | 13 lines Merged revisions 193193 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193193 | kpfleming | 2009-05-08 09:03:28 -0500 (Fri, 08 May 2009) | 7 lines Make absolute paths for logger channels work properly (Note: This is not a new feature, it was previously undocumented and broken.) The Asterisk logger has a feature to support absolute pathnames for logger channels, but the code implementing the feature was broken. This has been fixed, and the absolute path feature is now documented in the sample logger.conf. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@193197 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-02Merged revisions 191775 via svnmerge from kpfleming1-2/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r191775 | kpfleming | 2009-05-02 20:39:48 +0200 (Sat, 02 May 2009) | 5 lines Fix an error in queue_log file rotation optimization code This code was copy-and-pasted without properly changing references to event_rotate into queue_rotate, so under some conditions the log rotation would rotate queue_log even though it was not necessary. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@191779 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16Assist proper thread synchronization when stopping the logger thread.mmichelson1-2/+7
I was finding that on my dev box, occasionally attempting to "stop now" in trunk would cause Asterisk to hang. I traced this to the fact that the logger thread was waiting on a condition which had already been signalled. The logger thread also need to be sure to check the value of the close_logger_thread variable. The close_logger_thread variable is only checked when the list of logmessages is empty. This allows for the logger thread to print and free any pending messages before exiting. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176174 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09Added a comment to logger.c about where to put includesmnicholson1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168054 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09Use ast_safe_system() in logger.c instead of system()mnicholson1-2/+3
(closes issue #14194) Reported by: pabelanger git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168014 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)tilghman1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05Janitor, use ARRAY_LEN() when possible.eliel1-1/+1
(closes issue #13990) Reported by: eliel Patches: array_len.diff uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29incorporates r159808 from branches/1.4:kpfleming1-1/+1
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon ↵twilson1-1/+1
trying to parse an invalid config git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19Starting with a change to ensure that ast_verbose() preserves ABI compatibilitytilghman1-4/+20
in 1.6.1 (as compared to 1.6.0 and versions of 1.4), this change also deprecates the use of Asterisk with FreeBSD 4, given the central use of va_copy in core functions. va_copy() is C99, anyway, and we already require C99 for other purposes, so this isn't really a big change anyway. This change also simplifies some of the core ast_str_* functions. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157639 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵kpfleming1-1/+3
branch, and add the ones needed for all the new code here too git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10Another batch of files from RSW. The remaining apps and a few moreseanbright1-15/+15
files from main/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137089 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-25minor change to test automergekpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@133819 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-24Print the correct PID in log messages. Prior tommichelson1-7/+9
this commit, only the logger thread's PID would be printed. (closes issue #13150) Reported by: atis Patches: log_pid.diff uploaded by putnopvut (license 60) Tested by: eliel git-svn-id: http://svn.digium.com/svn/asterisk/trunk@133448 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-16Fix rotate strategytilghman1-4/+4
(Closes issue #13086) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@131166 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08Janitor project to convert sizeof to ARRAY_LEN macro.bbryant1-2/+2
(closes issue #13002) Reported by: caio1982 Patches: janitor_arraylen5.diff uploaded by caio1982 (license 22) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129045 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-01use %p to print a pointerrizzo1-5/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126835 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19Older versions of GNU gcc do not allow 'NULL' as sentinel.mvanbaak1-1/+1
They want (char *)NULL as sentinel. An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4 This commit introduces a contstant SENTINEL which is declared as: #define SENTINEL ((char *)NULL) All places I could test compile on my openbsd system are converted. Update CODING-GUIDELINES to tell about this constant. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124127 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-03Do a deep copy of file and function strings to avoid a potential crash whenrussell1-5/+5
modules are unloaded. (closes issue #12780) Reported by: ys Patches: logger.diff uploaded by ys (license 281) -- modified by me for coding guidelines git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119892 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-29Adds support for changing logger settingss on remote consoles with a bbryant1-2/+41
new command "logger set level". i.e. "logger set level debug off" (closes issue #10891) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119126 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23A new feature thanks to the fine folks at Switchvox!mmichelson1-14/+51
If a deadlock is detected, then the typical lock information will be printed along with a backtrace of the stack for the offending threads. Use of this requires compiling with DETECT_DEADLOCKS and having glibc installed. Furthermore, issuing the "core show locks" CLI command will print the normal lock information as well as a backtraces for each lock. This requires that DEBUG_THREADS is enabled and that glibc is installed. All the backtrace features may be disabled by running the configure script with --without-execinfo as an argument git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118173 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21This change makes it so that logs will report the correct source of verbose ↵mmichelson1-2/+2
messages. Until this change, all verbose messages in Asterisk's log files reported logger.c as the source of the message. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117693 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-19The logger closes the files it is logging to when reloading so we have to ↵file1-5/+5
read in the logger configuration even if it has not changed so that the logs get opened again. (closes issue #12665) Reported by: DennisD git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117085 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-05Merged revisions 115333 via svnmerge from tilghman1-2/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115333 | tilghman | 2008-05-05 17:50:31 -0500 (Mon, 05 May 2008) | 7 lines Separate verbose output from CLI output, by using a preamble. (closes issue #12402) Reported by: Corydon76 Patches: 20080410__no_verbose_in_rx_output.diff.txt uploaded by Corydon76 (license 14) 20080501__no_verbose_in_rx_output__1.4.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115334 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-16Standardized routines for forking processes (keeps all the specialized code ↵tilghman1-0/+49
in one place). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114188 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Add the "config reload <conffile>" command, which allows you to tell Asterisktilghman1-1/+1
to reload any file that references a given configuration file. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111012 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Make sure values are interpreted as character strings and not format strings.file1-1/+1
(AST-2008-004) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109396 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04Whitespace changes onlytilghman1-19/+19
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105840 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-11Just some minor coding style cleanup...file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103318 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-05Get rid of any remaining ast_verbose calls in the code in favor of mmichelson1-4/+2
ast_verb (closes issue #11934) Reported by: mvanbaak Patches: 20080205_astverb-2.diff.txt uploaded by mvanbaak (license 7) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@102525 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-28Normalize the detection for execinfo, so that Linux (glibc) and other platformstilghman1-7/+3
with libexecinfo will generate inline stack backtraces correctly. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100628 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26Adding support for storing the queue log entries in a realtime backend.mmichelson1-9/+25
(closes issue #11625, reported and patched by sergee) Thank you very much to sergee for adding this new feature! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94782 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14After reading Russell's e-mail to the dev list stating that checking ↵mmichelson1-4/+2
option_verbose is not equivalent to the check done by ast_verb, I wrote a macro, VERBOSITY_LEVEL, which does this check. I did a quick look in the source and used this macro in some places where option_verbose was used. I also converted some verbose messages in logger.c to use ast_verb instead of ast_verbose. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-12Conversions of free to ast_free, where applicable, and several other ↵tilghman1-7/+7
formatting fixes. Reported by: eliel Patch by: eliel,tilghman (Closes issue #11209) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92594 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Doxygen updatesoej1-4/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91385 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Merged revisions 91366 via svnmerge from oej1-4/+13
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91366 | oej | 2007-12-06 13:54:11 +0100 (Tor, 06 Dec 2007) | 4 lines Make sure logger is reloaded at general reload in the cli. (Discovered during Asterisk training in Portugal) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91384 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove a bunch of useless #include "options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move internal function declarations to include/asterisk/_private.hrizzo1-3/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyrizzo1-0/+5
were included almost everywhere. Remove some of the instances. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16remove a bunch of duplicate includesrizzo1-1/+0
Reproduce with grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-6/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b