summaryrefslogtreecommitdiff
path: root/include/asterisk/logger.h
AgeCommit message (Collapse)Author
2007-12-14Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14After reading Russell's e-mail to the dev list stating that checking ↵Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@93042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11A lot of doxygen updatesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06Merged revisions 91366 via svnmerge from Olle Johansson
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: https://origsvn.digium.com/svn/asterisk/trunk@91384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19revert inclusion of options.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16logger.h does not need options.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-13Merged revisions 85533 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85533 | russell | 2007-10-13 01:48:10 -0400 (Sat, 13 Oct 2007) | 12 lines Fix an issue with console verbosity when running asterisk -rx to execute a command and retrieve its output. The issue was that there was no way for the main Asterisk process to know that the remote console was connecting in the -rx mode. The way that James has fixed this is to have all remote consoles muted by default. Then, regular remote consoles automatically execute a CLI command to unmute themselves when they first start up. (closes issue #10847) Reported by: atis Patches: asterisk-consolemute.diff.txt uploaded by jamesgolovich (license 176) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-04logger.h depends on options.h, so go ahead and include itRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23(closes issue #10192)Russell Bryant
Reported by: bbryant Patches: 20070720__core_debug_by_file.patch uploaded by bbryant (license 36) (with some modifications by me) Tested by: russell, bbryant This set of changes introduces the ability to set the core debug or verbose levels on a per-file basis. Interestingly enough, in 1.4, you have the ability to set core debug for a single file, but that functionality was accidentally lost in the conversion of the CLI commands to the new format. This patch improves upon what was in 1.4 by letting you set it for more than 1 file, and by also supporting verbose. *** Janitor Project *** This patch also introduces a new macro, ast_verb(), which is similar to ast_debug(). Setting the per file verbose value only works for messages that use this macro. Converting existing uses of ast_verbose() can be done like: if (option_debug > 2) ast_verbose(VERBOSE_PREFIX_3 "Something useful\n"); ... ast_verb(3, "Something useful\n"); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12Put parenthesis around the level argument to ast_debug()Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12Add a new macro, ast_debug(), which combines the check of the value ofRussell Bryant
option_debug and the actual call to ast_log(). (issue #9925, dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28Merged revisions 43933 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r43933 | file | 2006-09-28 14:05:43 -0400 (Thu, 28 Sep 2006) | 2 lines Put in missing \ns on the end of ast_logs (issue #7936 reported by wojtekka) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08Merge team/russell/ast_verbose_threadstorageRussell Bryant
- instead of defining a free() wrapper in a bunch of files, define it as ast_free() in utils.h and remove the copies from all the files. - centralize and abstract the code used for doing thread storage. The code lives in threadstorage.h, with one function being implemented in utils.c. This new API includes generic thread storage as well as special functions for handling thread local dynamic length string buffers. - update ast_inet_ntoa() to use the new threadstorage API - update ast_state2str() to use the new threadstorage API - update ast_cli() to use the new threadstorage API - Modify manager_event() to use thread storage. Instead of using a buffer of 4096 characters as the workspace for building the manager event, use a thread local dynamic string. Now there is no length limitation on the length of the body of a manager event. - Significantly simplify the handling of ast_verbose() ... - Instead of using a static char buffer and a lock to make sure only one thread can be using ast_verbose() at a time, use a thread local dynamic string as the workspace for preparing the verbose message. Instead of locking around the entire function, the only locking done now is when the message has been built and is being deliviered to the list of registered verbose message handlers. - This function was doing a strdup() on every message passed to it and keeping a queue of the last 200 messages in memory. This has been completely removed. The only place this was used was that if there were any messages in the verbose queue when a verbose handler was registered, all of the messages in the queue would be fed to it. So, I just made sure that the console verbose handler and the network verbose handler (for remote asterisk consoles) were registered before any verbose messages. pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at startup, but I didn't feel the performance hit of this message queue was worth saving the initial verbose output for these very rarely used modules. - I have removed the last three arguments to the verbose handlers, leaving only the string itself because they aren't needed anymore. For example, ast_verbose had some logic for telling the verbose handler to add a newline if the buffer was completely full. Now that the buffer can grow as needed, this doesn't matter anymore. - remove unused function, ast_verbose_dmesg() which was to dispatch the message queue - Convert the list of verbose handlers to use the linked list macros. - add missing newline characters to a few ast_verbose() calls - convert the list of log channels to use the linked list macros in logger.c - fix close_logger() to close all of the files it opened for logging - update ast_log() to use a thread local dynamic string for its workspace for preparing log messages instead of a buffer of size BUFSIZ (8kB on my system) allocated on the stack. The dynamic string in this case is limited to only growing to a maximum size of BUFSIZ. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26Fix various problems in the addition of the ability to mute log/verboseRussell Bryant
output to remove consoles. The prototypes added to logger.h still need doxygen documentation, as well. - Add the new command line option to the man page - make the mute option a flag instead of an int since it is only a binary option - remove useless extern keywords for prototypes added to logger.h - rename ast_console_mute() to ast_console_toggle_mute() since that is what it actually does - actually apply the mute option to newly created remote consoles instead of only working when the CLI command is used - don't imply the NO_FORK option if the mute command line option is provided - place the new CLI command in the correct place in the list which has to be in alphabetical order - Finally, clean up a few spacing issues to conform to the coding guidelines git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26Add ability to disable log / verbose output to remote consoles (issue #6524 ↵Joshua Colp
reported by mavetju) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31more trailing whitespace and extern removalLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26Merged revisions 11165 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11165 | tilghman | 2006-02-26 10:26:39 -0600 (Sun, 26 Feb 2006) | 2 lines Bug 5950 - reenable queue log rotation; also, eliminate redundant code ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27Bug 5183 - Inline stack backtracesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04convert most of the option_*'s to a single ast_flags structure. Also, fix someRussell Bryant
formatting, remove some unnecessary casts, and other little code cleanups. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-08first set of Cygwin portability stuff (issue #4678)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.Kevin P. Fleming
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-25doc updates and copyright header cleanup (issue #5027)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-22add a LOG_DTMF logging channel and send all bridged DTMF events out that ↵Kevin P. Fleming
channel (issue #4835) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-03-17Add support for Solaris/x86 (bug #3064)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-15Repair // comments to /* */ comments (bug #3347)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-12Add queue logging and fix indications bugletMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-01-27Add verbose messages to be logged (bug #599)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-01-12Add ww's improved syslog support (bug #587)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-03-16dom mar 16 23:37:23 CET 2003Matteo Brancaleoni
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2002-06-21Version 0.1.12 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2001-11-01Version 0.1.10 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2001-04-16Version 0.1.8 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1999-12-11Version 0.1.1 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1999-10-27Version 0.1.0 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10 65c4cc65-6c06-0410-ace0-fbb531ad65f3