logging-stack.h

Go to the documentation of this file.
00001 // logging utilities with stack info logging
00002 #ifndef __logging_stack_h__
00003 #define __logging_stack_h__
00004 
00005 #include "common/logging_c.h"
00006 
00007 #if __DO_LOGGING__
00008 
00009 #include "common/utilities.h" // get_stack_info_string()
00010 #define log_stack_info(f) { char* _s = get_stack_info_string(); if (_s) { log_text(f,_s); g_free(_s); } }
00011 
00012 #else
00013 
00014 #define log_stack_info(f) ((void)0)
00015 
00016 #endif
00017 
00018 #define logst log_stack_info(PRIMARY_LOG_FILENAME)
00019 
00020 #endif /* __logging_stack_h__ */
00021 
00022 /**
00023 
00024 logging-stack.h
00025 
00026 Copyright 2009 Helsinki Institute for Information Technology (HIIT)
00027 and the authors. All rights reserved.
00028 
00029 Authors: Tero Hasu <tero.hasu@hut.fi>
00030 
00031 Permission is hereby granted, free of charge, to any person
00032 obtaining a copy of this software and associated documentation files
00033 (the "Software"), to deal in the Software without restriction,
00034 including without limitation the rights to use, copy, modify, merge,
00035 publish, distribute, sublicense, and/or sell copies of the Software,
00036 and to permit persons to whom the Software is furnished to do so,
00037 subject to the following conditions:
00038 
00039 The above copyright notice and this permission notice shall be
00040 included in all copies or substantial portions of the Software.
00041 
00042 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00043 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00044 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00045 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00046 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00047 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00048 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00049 SOFTWARE.
00050 
00051  **/

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:54 2011 by Doxygen 1.6.1