/usr/include/glibmm-utils-1.0/glibmm-utils/log-stream-utils.h is in libglibmm-utils-dev 0.4.1-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | /* -*- Mode: C++; indent-tabs-mode:nil; c-basic-offset: 4-*- */
/* Copyright (c) 2005-2006 Dodji Seketeli
* 2007 Marko Anastasov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __GLIBMM_UTILS_LOG_STREAM_UTILS_H__
#define __GLIBMM_UTILS_LOG_STREAM_UTILS_H__
#include <cassert>
#include <cstdlib>
#include "log-stream.h"
#include "scope-logger.h"
#ifndef HERE
#define HERE __ASSERT_FUNCTION << ":" <<__FILE__<< ":" << __LINE__ << ": "
#endif
#ifndef PRETY_FUNCTION_NAME_
#define PRETTY_FUNCTION_NAME_ __ASSERT_FUNCTION
#endif
#ifndef LOG_STREAM
#define LOG_STREAM Glib::Util::LogStream::default_log_stream ()
#endif
#ifndef LOG_MARKER_INFO
#define LOG_MARKER_INFO "|I|"
#endif
#ifndef LOG_MARKER_ERROR
#define LOG_MARKER_ERROR "|E|"
#endif
#ifndef LOG_MARKER_EXCEPTION
#define LOG_MARKER_EXCEPTION "|X|"
#endif
#ifndef LOG_LEVEL_NORMAL___
#define LOG_LEVEL_NORMAL___ Glib::Util::level_normal
#endif
#ifndef LOG_LEVEL_VERBOSE___
#define LOG_LEVEL_VERBOSE___ Glib::Util::level_verbose
#endif
#ifndef LOG
#define LOG(message) \
LOG_STREAM << LOG_LEVEL_NORMAL___ << LOG_MARKER_INFO << HERE << message << Glib::Util::endl
#endif
#ifndef LOG_D
#define LOG_D(message, domain) \
LOG_STREAM.push_domain (domain) ; LOG (message) ; LOG_STREAM.pop_domain ();
#endif
#ifndef LOG_DD
#define LOG_DD(message) LOG_D(message, GLIBMM_DEFAULT_DOMAIN)
#endif
#ifndef LOG_ERROR
#define LOG_ERROR(message) \
LOG_STREAM << LOG_LEVEL_NORMAL___ << LOG_MARKER_ERROR << HERE << message << Glib::Util::endl
#endif
#ifndef LOG_EXCEPTION
#define LOG_EXCEPTION(message) \
LOG_STREAM << LOG_LEVEL_NORMAL___ << LOG_MARKER_EXCEPTION << HERE << message << Glib::Util::endl
#endif
#ifndef LOG_EXCEPTION_D
#define LOG_EXCEPTION_D(message, domain) \
LOG_STREAM.push_domain (domain) ; LOG_EXCEPTION (message) ; LOG_STREAM.pop_domain() ;
#endif
#ifndef LOG_EXCEPTION_DD
#define LOG_EXCEPTION_DD(message) LOG_EXCEPTION_D (message, GLIBMM_DEFAULT_DOMAIN)
#endif
#ifndef LOG_ERROR_D
#define LOG_ERROR_D(message, domain) \
LOG_STREAM.push_domain (domain) ; LOG_ERROR (message) ; LOG_STREAM.pop_domain() ;
#endif
#ifndef LOG_ERROR_DD
#define LOG_ERROR_DD(message) LOG_ERROR_D (message, GLIBMM_DEFAULT_DOMAIN)
#endif
#ifndef LOG_VERBOSE
#define LOG_VERBOSE(message) \
LOG_STREAM << LOG_LEVEL_VERBOSE___ << LOG_MARKER_INFO << HERE << message << Glib::Util::endl
#endif
#ifndef LOG_VERBOSE_D
#define LOG_VERBOSE_D(message) \
LOG_STREAM.push_domain (domain) ; LOG_VERBOSE(message) ;LOG_STREAM.pop_domain();
#endif
#ifndef LOG_SCOPE
#define LOG_SCOPE(scopename) \
Glib::Util::ScopeLogger scope_logger (scopename, Glib::Util::LogStream::LOG_LEVEL_VERBOSE) ;
#endif
#ifndef LOG_SCOPE_D
#define LOG_SCOPE_D(scopename, domain) \
Glib::Util::ScopeLogger scope_logger \
(scopename, Glib::Util::LogStream::LOG_LEVEL_VERBOSE, domain) ;
#endif
#ifndef LOG_SCOPE_NORMAL
#define LOG_SCOPE_NORMAL(scopename) \
Glib::Util::ScopeLogger scope_logger (scopename, Glib::Util::LogStream::LOG_LEVEL_NORMAL) ;
#endif
#ifndef LOG_SCOPE_NORMAL_D
#define LOG_SCOPE_NORMAL_D(scopename, domain) \
Glib::Util::ScopeLogger scope_logger \
(scopename, Glib::Util::LogStream::LOG_LEVEL_NORMAL, domain) ;
#endif
#ifndef LOG_FUNCTION_SCOPE
#define LOG_FUNCTION_SCOPE LOG_SCOPE(PRETTY_FUNCTION_NAME_)
#endif
#ifndef LOG_FUNCTION_SCOPE_D
#define LOG_FUNCTION_SCOPE_D(domain) LOG_SCOPE_D(PRETTY_FUNCTION_NAME_, domain)
#endif
#ifndef LOG_FUNCTION_SCOPE_NORMAL
#define LOG_FUNCTION_SCOPE_NORMAL LOG_SCOPE_NORMAL(PRETTY_FUNCTION_NAME_)
#endif
#ifndef LOG_FUNCTION_SCOPE_NORMAL_D
#define LOG_FUNCTION_SCOPE_NORMAL_D(domain) \
LOG_SCOPE_NORMAL_D(PRETTY_FUNCTION_NAME_, domain)
#endif
#ifndef LOG_FUNCTION_SCOPE_NORMAL_DD
#define LOG_FUNCTION_SCOPE_NORMAL_DD LOG_FUNCTION_SCOPE_NORMAL_D(GLIBMM_DEFAULT_DOMAIN)
#endif
#endif // __GLIBMM_UTILS_LOG_STREAM_UTILS_H__
|