libzypp: zypp/base/LogControl.cc Source File

libzypp 17.25.10

LogControl.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 #include <fstream>
14 #include <string>
15
16 #include <zypp/base/Logger.h>
17 #include <zypp/base/LogControl.h>
18 #include <zypp/base/ProfilingFormater.h>
19 #include <zypp/base/String.h>
20 #include <zypp/Date.h>
21 #include <zypp/PathInfo.h>
22
23 using std::endl;
24
26 namespace zypp
27 {
28
29 #ifndef ZYPP_NDEBUG
30 namespace debug
31 {
32 // Fg::Black: 30 Bg: 40 Attr::Normal: 22;27
33 // Fg::Red: 31 ... Attr::Bright: 1
34 // Fg::Green: 32 Attr::Reverse: 7
35 // Fg::Yellow: 33
36 // Fg::Blue: 34
37 // Fg::Magenta: 35
38 // Fg::Cyan: 36
39 // Fg::White: 37
40 // Fg::Default: 39
41 static constexpr std::string_view OO { "\033[0m" };
42 static constexpr std::string_view WH { "\033[37;40m" };
43 static constexpr std::string_view CY { "\033[36;40m" };
44 static constexpr std::string_view YE { "\033[33;1;40m" };
45 static constexpr std::string_view GR { "\033[32;40m" };
46 static constexpr std::string_view RE { "\033[31;1;40m" };
47 static constexpr std::string_view MA { "\033[35;40m" };
48
49 unsigned TraceLeave::_depth = 1;
50
51 std::string tracestr( char tag_r, unsigned depth_r, const char * file_r, const char * fnc_r, int line_r )
52 {
53 static str::Format fmt { "*** %s %s(%s):%d" };
54 fmt % std::string(depth_r,tag_r) % file_r % fnc_r % line_r;
55 return fmt;
56 }
57
58 TraceLeave::TraceLeave( const char * file_r, const char * fnc_r, int line_r )
59 : _file( std::move(file_r) )
60 , _fnc( std::move(fnc_r) )
61 , _line( line_r )
62 {
63 const std::string & m { tracestr( '>',_depth++, _file,_fnc,_line ) };
64 USR << m << endl;
65 Osd(1) << m << endl;
66 }
67
68 TraceLeave::~TraceLeave()
69 {
70 const std::string & m { tracestr( '<',--_depth, _file,_fnc,_line ) };
71 USR << m << endl;
72 Osd(1) << m << endl;
73 }
74
75 Osd::Osd( int i )
76 : _str { std::cerr }
77 { _str << (i?WH:YE); }
78
79 Osd::~Osd()
80 { _str << OO; }
81
82 Osd & Osd::operator<<( std::ostream& (*iomanip)( std::ostream& ) )
83 { _str << iomanip; return *this; }
84 }
85 #endif // ZYPP_NDEBUG
86
88 namespace log
89 {
90
91 StdoutLineWriter::StdoutLineWriter()
92 : StreamLineWriter( std::cout )
93 {}
94
95 StderrLineWriter::StderrLineWriter()
96 : StreamLineWriter( std::cerr )
97 {}
98
99 FileLineWriter::FileLineWriter( const Pathname & file_r, mode_t mode_r )
100 {
101 if ( file_r == Pathname("-") )
102 {
103 _str = &std::cerr;
104 }
105 else
106 {
107 if ( mode_r )
108 {
109 // not filesystem::assert_file as filesystem:: functions log,
110 // and this FileWriter is not yet in place.
111 int fd = ::open( file_r.c_str(), O_CREAT|O_EXCL, mode_r );
112 if ( fd != -1 )
113 ::close( fd );
114 }
115 // set unbuffered write
116 std::ofstream * fstr = 0;
117 _outs.reset( (fstr = new std::ofstream( file_r.asString().c_str(), std::ios_base::app )) );
118 fstr->rdbuf()->pubsetbuf(0,0);
119 _str = &(*fstr);
120 }
121 }
122
124 } // namespace log
126
128 namespace base
129 {
130
132 // LineFormater
134 std::string LogControl::LineFormater::format( const std::string & group_r,
135 logger::LogLevel level_r,
136 const char * file_r,
137 const char * func_r,
138 int line_r,
139 const std::string & message_r )
140 {
141 static char hostname[1024];
142 static char nohostname[] = "unknown";
143 std::string now( Date::now().form( "%Y-%m-%d %H:%M:%S" ) );
144 return str::form( "%s <%d> %s(%d) [%s] %s(%s):%d %s",
145 now.c_str(), level_r,
146 ( gethostname( hostname, 1024 ) ? nohostname : hostname ),
147 getpid(),
148 group_r.c_str(),
149 file_r, func_r, line_r,
150 message_r.c_str() );
151 }
152
154 namespace logger
155 {
156
157 inline void putStream( const std::string & group_r, LogLevel level_r,
158 const char * file_r, const char * func_r, int line_r,
159 const std::string & buffer_r );
160
162 //
163 // CLASS NAME : Loglinebuf
164 //
165 class Loglinebuf : public std::streambuf {
166
167 public:
169 Loglinebuf( const std::string & group_r, LogLevel level_r )
170 : _group( group_r )
171 , _level( level_r )
172 , _file( "" )
173 , _func( "" )
174 , _line( -1 )
175 {}
177 ~Loglinebuf()
178 {
179 if ( !_buffer.empty() )
180 writeout( "\n", 1 );
181 }
182
184 void tagSet( const char * fil_r, const char * fnc_r, int lne_r )
185 {
186 _file = fil_r;
187 _func = fnc_r;
188 _line = lne_r;
189 }
190
191 private:
193 virtual std::streamsize xsputn( const char * s, std::streamsize n )
194 { return writeout( s, n ); }
196 virtual int overflow( int ch = EOF )
197 {
198 if ( ch != EOF )
199 {
200 char tmp = ch;
201 writeout( &tmp, 1 );
202 }
203 return 0;
204 }
206 virtual int writeout( const char* s, std::streamsize n )
207 {
208 //logger::putStream( _group, _level, _file, _func, _line, _buffer );
209 //return n;
210 if ( s && n )
211 {
212 const char * c = s;
213 for ( int i = 0; i < n; ++i, ++c )
214 {
215 if ( *c == '\n' ) {
216 _buffer += std::string( s, c-s );
217 logger::putStream( _group, _level, _file, _func, _line, _buffer );
218 _buffer = std::string();
219 s = c+1;
220 }
221 }
222 if ( s < c )
223 {
224 _buffer += std::string( s, c-s );
225 }
226 }
227 return n;
228 }
229
230 private:
231 std::string _group;
232 LogLevel _level;
233 const char * _file;
234 const char * _func;
235 int _line;
236 std::string _buffer;
237 };
238
240
242 //
243 // CLASS NAME : Loglinestream
244 //
245 class Loglinestream {
246
247 public:
249 Loglinestream( const std::string & group_r, LogLevel level_r )
250 : _mybuf( group_r, level_r )
251 , _mystream( &_mybuf )
252 {}
254 ~Loglinestream()
255 { _mystream.flush(); }
256
257 public:
259 std::ostream & getStream( const char * fil_r, const char * fnc_r, int lne_r )
260 {
261 _mybuf.tagSet( fil_r, fnc_r, lne_r );
262 return _mystream;
263 }
264
265 private:
266 Loglinebuf _mybuf;
267 std::ostream _mystream;
268 };
270
272 //
273 // CLASS NAME : LogControlImpl
274 //
284 struct LogControlImpl
285 {
286 public:
287 bool isExcessive()
288 { return _excessive; }
289
290 void excessive( bool onOff_r )
291 { _excessive = onOff_r; }
292
294 void setLineWriter( const shared_ptr<LogControl::LineWriter> & writer_r )
295 { _lineWriter = writer_r; }
296
297 shared_ptr<LogControl::LineWriter> getLineWriter() const
298 { return _lineWriter; }
299
301 void setLineFormater( const shared_ptr<LogControl::LineFormater> & format_r )
302 {
303 if ( format_r )
304 _lineFormater = format_r;
305 else
306 _lineFormater.reset( new LogControl::LineFormater );
307 }
308
309 void logfile( const Pathname & logfile_r, mode_t mode_r = 0640 )
310 {
311 if ( logfile_r.empty() )
312 setLineWriter( shared_ptr<LogControl::LineWriter>() );
313 else if ( logfile_r == Pathname( "-" ) )
314 setLineWriter( shared_ptr<LogControl::LineWriter>(new log::StderrLineWriter) );
315 else
316 setLineWriter( shared_ptr<LogControl::LineWriter>(new log::FileLineWriter(logfile_r, mode_r)) );
317 }
318
319 private:
320 std::ostream _no_stream;
321 bool _excessive;
322
323 shared_ptr<LogControl::LineFormater> _lineFormater;
324 shared_ptr<LogControl::LineWriter> _lineWriter;
325
326 public:
328 std::ostream & getStream( const std::string & group_r,
329 LogLevel level_r,
330 const char * file_r,
331 const char * func_r,
332 const int line_r )
333 {
334 if ( ! _lineWriter )
335 return _no_stream;
336 if ( level_r == E_XXX && !_excessive )
337 return _no_stream;
338
339 if ( !_streamtable[group_r][level_r] )
340 {
341 _streamtable[group_r][level_r].reset( new Loglinestream( group_r, level_r ) );
342 }
343 std::ostream & ret( _streamtable[group_r][level_r]->getStream( file_r, func_r, line_r ) );
344 if ( !ret )
345 {
346 ret.clear();
347 ret << "---<RESET LOGSTREAM FROM FAILED STATE]" << endl;
348 }
349 return ret;
350 }
351
353 void putStream( const std::string & group_r,
354 LogLevel level_r,
355 const char * file_r,
356 const char * func_r,
357 int line_r,
358 const std::string & message_r )
359 {
360 if ( _lineWriter )
361 _lineWriter->writeOut( _lineFormater->format( group_r, level_r,
362 file_r, func_r, line_r,
363 message_r ) );
364 }
365
366 private:
367 typedef shared_ptr<Loglinestream> StreamPtr;
368 typedef std::map<LogLevel,StreamPtr> StreamSet;
369 typedef std::map<std::string,StreamSet> StreamTable;
371 StreamTable _streamtable;
372
373 private:
377 LogControlImpl()
378 : _no_stream( NULL )
379 , _excessive( getenv("ZYPP_FULLLOG") )
380 , _lineFormater( new LogControl::LineFormater )
381 {
382 if ( getenv("ZYPP_LOGFILE") )
383 logfile( getenv("ZYPP_LOGFILE") );
384
385 if ( getenv("ZYPP_PROFILING") )
386 {
387 shared_ptr<LogControl::LineFormater> formater(new ProfilingFormater);
388 setLineFormater(formater);
389 }
390 }
391
392 ~LogControlImpl()
393 {
394 _lineWriter.reset();
395 }
396
397 public:
404 static LogControlImpl & instance();
405 };
407
408 // 'THE' LogControlImpl singleton
409 inline LogControlImpl & LogControlImpl::instance()
410 {
411 static LogControlImpl _instance;
412 return _instance;
413 }
414
416
418 inline std::ostream & operator<<( std::ostream & str, const LogControlImpl & obj )
419 {
420 return str << "LogControlImpl";
421 }
422
424 //
425 // Access from logger::
426 //
428
429 std::ostream & getStream( const char * group_r,
430 LogLevel level_r,
431 const char * file_r,
432 const char * func_r,
433 const int line_r )
434 {
435 return LogControlImpl::instance().getStream( group_r,
436 level_r,
437 file_r,
438 func_r,
439 line_r );
440 }
441
443 inline void putStream( const std::string & group_r, LogLevel level_r,
444 const char * file_r, const char * func_r, int line_r,
445 const std::string & buffer_r )
446 {
447 LogControlImpl::instance().putStream( group_r, level_r,
448 file_r, func_r, line_r,
449 buffer_r );
450 }
451
452 bool isExcessive()
453 { return LogControlImpl::instance().isExcessive(); }
454
456 } // namespace logger
458
460 //
461 // CLASS NAME : LogControl
462 // Forward to LogControlImpl singleton.
463 //
465
466 using logger::LogControlImpl;
467
468 void LogControl::logfile( const Pathname & logfile_r )
469 { LogControlImpl::instance().logfile( logfile_r ); }
470
471 void LogControl::logfile( const Pathname & logfile_r, mode_t mode_r )
472 { LogControlImpl::instance().logfile( logfile_r, mode_r ); }
473
474 shared_ptr<LogControl::LineWriter> LogControl::getLineWriter() const
475 { return LogControlImpl::instance().getLineWriter(); }
476
477 void LogControl::setLineWriter( const shared_ptr<LineWriter> & writer_r )
478 { LogControlImpl::instance().setLineWriter( writer_r ); }
479
480 void LogControl::setLineFormater( const shared_ptr<LineFormater> & formater_r )
481 { LogControlImpl::instance().setLineFormater( formater_r ); }
482
483 void LogControl::logNothing()
484 { LogControlImpl::instance().setLineWriter( shared_ptr<LineWriter>() ); }
485
486 void LogControl::logToStdErr()
487 { LogControlImpl::instance().setLineWriter( shared_ptr<LineWriter>( new log::StderrLineWriter ) ); }
488
490 //
491 // LogControl::TmpExcessive
492 //
494 LogControl::TmpExcessive::TmpExcessive()
495 { LogControlImpl::instance().excessive( true ); }
496 LogControl::TmpExcessive::~TmpExcessive()
497 { LogControlImpl::instance().excessive( false ); }
498
499 /******************************************************************
500 **
501 ** FUNCTION NAME : operator<<
502 ** FUNCTION TYPE : std::ostream &
503 */
504 std::ostream & operator<<( std::ostream & str, const LogControl & obj )
505 {
506 return str << LogControlImpl::instance();
507 }
508
510 } // namespace base
513 } // namespace zypp
Date.h
LogControl.h
Logger.h
USR
#define USR
Definition: Logger.h:96
PathInfo.h
_buffer
const std::string & _buffer
Definition: PluginScript.cc:62
ProfilingFormater.h
String.h
zypp::Date::now
static Date now()
Return the current time.
Definition: Date.h:78
zypp::base::LogControl
Maintain logfile related options.
Definition: LogControl.h:97
zypp::base::LogControl::getLineWriter
shared_ptr< LineWriter > getLineWriter() const
Get the current LineWriter.
Definition: LogControl.cc:474
zypp::base::LogControl::setLineWriter
void setLineWriter(const shared_ptr< LineWriter > &writer_r)
Assign a LineWriter.
Definition: LogControl.cc:477
zypp::base::LogControl::logToStdErr
void logToStdErr()
Log to std::err.
Definition: LogControl.cc:486
zypp::base::LogControl::logNothing
void logNothing()
Turn off logging.
Definition: LogControl.cc:483
zypp::base::LogControl::setLineFormater
void setLineFormater(const shared_ptr< LineFormater > &formater_r)
Assign a LineFormater.
Definition: LogControl.cc:480
zypp::base::LogControl::instance
static LogControl instance()
Singleton access.
Definition: LogControl.h:102
zypp::base::LogControl::logfile
void logfile(const Pathname &logfile_r)
Set path for the logfile.
Definition: LogControl.cc:468
zypp::base::LogControl::operator<<
friend std::ostream & operator<<(std::ostream &str, const LogControl &obj)
Definition: LogControl.cc:504
zypp::base::logger::Loglinebuf
Definition: LogControl.cc:165
zypp::base::logger::Loglinebuf::_buffer
std::string _buffer
Definition: LogControl.cc:236
zypp::base::logger::Loglinebuf::_func
const char * _func
Definition: LogControl.cc:234
zypp::base::logger::Loglinebuf::overflow
virtual int overflow(int ch=EOF)
Definition: LogControl.cc:196
zypp::base::logger::Loglinebuf::_group
std::string _group
Definition: LogControl.cc:231
zypp::base::logger::Loglinebuf::_level
LogLevel _level
Definition: LogControl.cc:232
zypp::base::logger::Loglinebuf::xsputn
virtual std::streamsize xsputn(const char *s, std::streamsize n)
Definition: LogControl.cc:193
zypp::base::logger::Loglinebuf::Loglinebuf
Loglinebuf(const std::string &group_r, LogLevel level_r)
Definition: LogControl.cc:169
zypp::base::logger::Loglinebuf::_file
const char * _file
Definition: LogControl.cc:233
zypp::base::logger::Loglinebuf::tagSet
void tagSet(const char *fil_r, const char *fnc_r, int lne_r)
Definition: LogControl.cc:184
zypp::base::logger::Loglinebuf::writeout
virtual int writeout(const char *s, std::streamsize n)
Definition: LogControl.cc:206
zypp::base::logger::Loglinebuf::_line
int _line
Definition: LogControl.cc:235
zypp::base::logger::Loglinebuf::~Loglinebuf
~Loglinebuf()
Definition: LogControl.cc:177
zypp::base::logger::Loglinestream
Definition: LogControl.cc:245
zypp::base::logger::Loglinestream::~Loglinestream
~Loglinestream()
Definition: LogControl.cc:254
zypp::base::logger::Loglinestream::_mystream
std::ostream _mystream
Definition: LogControl.cc:267
zypp::base::logger::Loglinestream::Loglinestream
Loglinestream(const std::string &group_r, LogLevel level_r)
Definition: LogControl.cc:249
zypp::base::logger::Loglinestream::getStream
std::ostream & getStream(const char *fil_r, const char *fnc_r, int lne_r)
Definition: LogControl.cc:259
zypp::base::logger::Loglinestream::_mybuf
Loglinebuf _mybuf
Definition: LogControl.cc:266
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
zypp::filesystem::Pathname::asString
const std::string & asString() const
String representation.
Definition: Pathname.h:91
zypp::filesystem::Pathname::empty
bool empty() const
Test for an empty path.
Definition: Pathname.h:114
zypp::filesystem::Pathname::c_str
const char * c_str() const
String representation.
Definition: Pathname.h:110
std
Definition: Arch.h:348
str
String related utilities and Regular expression matching.
zypp::base::logger::putStream
void putStream(const std::string &group_r, LogLevel level_r, const char *file_r, const char *func_r, int line_r, const std::string &buffer_r)
That's what Loglinebuf calls.
Definition: LogControl.cc:443
zypp::base::logger::LogLevel
LogLevel
Definition of log levels.
Definition: Logger.h:130
zypp::base::logger::E_XXX
@ E_XXX
Excessive logging.
Definition: Logger.h:131
zypp::base::logger::isExcessive
bool isExcessive()
Definition: LogControl.cc:452
zypp::base::logger::getStream
std::ostream & getStream(const char *group_r, LogLevel level_r, const char *file_r, const char *func_r, const int line_r)
Return a log stream to write on.
Definition: LogControl.cc:429
zypp::debug::WH
static constexpr std::string_view WH
Definition: LogControl.cc:42
zypp::debug::tracestr
std::string tracestr(char tag_r, unsigned depth_r, const char *file_r, const char *fnc_r, int line_r)
Definition: LogControl.cc:51
zypp::debug::OO
static constexpr std::string_view OO
Definition: LogControl.cc:41
zypp::debug::YE
static constexpr std::string_view YE
Definition: LogControl.cc:44
zypp::debug::CY
static constexpr std::string_view CY
Definition: LogControl.cc:43
zypp::debug::GR
static constexpr std::string_view GR
Definition: LogControl.cc:45
zypp::debug::MA
static constexpr std::string_view MA
Definition: LogControl.cc:47
zypp::debug::RE
static constexpr std::string_view RE
Definition: LogControl.cc:46
zypp::str::form
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Definition: String.cc:36
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::_file
Pathname _file
Definition: SystemCheck.cc:34
zypp::base::LogControl::LineFormater
If you want to format loglines by yourself, derive from this, and overload format.
Definition: LogControl.h:115
zypp::base::LogControl::LineFormater::format
virtual std::string format(const std::string &, logger::LogLevel, const char *, const char *, int, const std::string &)
Definition: LogControl.cc:134
zypp::base::LogControl::TmpExcessive::~TmpExcessive
~TmpExcessive()
Definition: LogControl.cc:496
zypp::base::LogControl::TmpExcessive::TmpExcessive
TmpExcessive()
Definition: LogControl.cc:494
zypp::base::ProfilingFormater
Definition: ProfilingFormater.h:27
zypp::base::logger::LogControlImpl
LogControl implementation (Singleton).
Definition: LogControl.cc:285
zypp::base::logger::LogControlImpl::_excessive
bool _excessive
Definition: LogControl.cc:321
zypp::base::logger::LogControlImpl::operator<<
std::ostream & operator<<(std::ostream &str, const LogControlImpl &obj)
Stream output.
Definition: LogControl.cc:418
zypp::base::logger::LogControlImpl::setLineWriter
void setLineWriter(const shared_ptr< LogControl::LineWriter > &writer_r)
NULL _lineWriter indicates no loggin.
Definition: LogControl.cc:294
zypp::base::logger::LogControlImpl::getLineWriter
shared_ptr< LogControl::LineWriter > getLineWriter() const
Definition: LogControl.cc:297
zypp::base::logger::LogControlImpl::~LogControlImpl
~LogControlImpl()
Definition: LogControl.cc:392
zypp::base::logger::LogControlImpl::LogControlImpl
LogControlImpl()
Singleton ctor.
Definition: LogControl.cc:377
zypp::base::logger::LogControlImpl::_streamtable
StreamTable _streamtable
one streambuffer per group and level
Definition: LogControl.cc:371
zypp::base::logger::LogControlImpl::StreamSet
std::map< LogLevel, StreamPtr > StreamSet
Definition: LogControl.cc:368
zypp::base::logger::LogControlImpl::instance
static LogControlImpl & instance()
The LogControlImpl singleton.
Definition: LogControl.cc:409
zypp::base::logger::LogControlImpl::isExcessive
bool isExcessive()
Definition: LogControl.cc:287
zypp::base::logger::LogControlImpl::StreamTable
std::map< std::string, StreamSet > StreamTable
Definition: LogControl.cc:369
zypp::base::logger::LogControlImpl::excessive
void excessive(bool onOff_r)
Definition: LogControl.cc:290
zypp::base::logger::LogControlImpl::StreamPtr
shared_ptr< Loglinestream > StreamPtr
Definition: LogControl.cc:367
zypp::base::logger::LogControlImpl::setLineFormater
void setLineFormater(const shared_ptr< LogControl::LineFormater > &format_r)
Assert _lineFormater is not NULL.
Definition: LogControl.cc:301
zypp::base::logger::LogControlImpl::getStream
std::ostream & getStream(const std::string &group_r, LogLevel level_r, const char *file_r, const char *func_r, const int line_r)
Provide the log stream to write (logger interface)
Definition: LogControl.cc:328
zypp::base::logger::LogControlImpl::logfile
void logfile(const Pathname &logfile_r, mode_t mode_r=0640)
Definition: LogControl.cc:309
zypp::base::logger::LogControlImpl::_lineWriter
shared_ptr< LogControl::LineWriter > _lineWriter
Definition: LogControl.cc:324
zypp::base::logger::LogControlImpl::_lineFormater
shared_ptr< LogControl::LineFormater > _lineFormater
Definition: LogControl.cc:323
zypp::base::logger::LogControlImpl::putStream
void putStream(const std::string &group_r, LogLevel level_r, const char *file_r, const char *func_r, int line_r, const std::string &message_r)
Format and write out a logline from Loglinebuf.
Definition: LogControl.cc:353
zypp::base::logger::LogControlImpl::_no_stream
std::ostream _no_stream
Definition: LogControl.cc:320
zypp::debug::Osd
Definition: Logger.h:43
zypp::debug::Osd::Osd
Osd(int=0)
Definition: LogControl.cc:75
zypp::debug::Osd::operator<<
Osd & operator<<(Tp &&val)
Definition: Logger.h:48
zypp::debug::Osd::_str
std::ostream & _str
Definition: Logger.h:54
zypp::debug::Osd::~Osd
~Osd()
Definition: LogControl.cc:79
zypp::debug::TraceLeave::TraceLeave
TraceLeave(const TraceLeave &)=delete
zypp::debug::TraceLeave::~TraceLeave
~TraceLeave()
Definition: LogControl.cc:68
zypp::debug::TraceLeave::_depth
static unsigned _depth
Definition: Logger.h:34
zypp::debug::TraceLeave::_line
int _line
Definition: Logger.h:37
zypp::debug::TraceLeave::_fnc
const char * _fnc
Definition: Logger.h:36
zypp::debug::TraceLeave::_file
const char * _file
Definition: Logger.h:35
zypp::log::FileLineWriter
LineWriter to file.
Definition: LogControl.h:73
zypp::log::FileLineWriter::_outs
shared_ptr< void > _outs
Definition: LogControl.h:76
zypp::log::FileLineWriter::FileLineWriter
FileLineWriter(const Pathname &file_r, mode_t mode_r=0)
Definition: LogControl.cc:99
zypp::log::StderrLineWriter
LineWriter to stderr.
Definition: LogControl.h:64
zypp::log::StderrLineWriter::StderrLineWriter
StderrLineWriter()
Definition: LogControl.cc:95
zypp::log::StdoutLineWriter::StdoutLineWriter
StdoutLineWriter()
Definition: LogControl.cc:91
zypp::log::StreamLineWriter
Base class for ostream based LineWriter.
Definition: LogControl.h:45
zypp::log::StreamLineWriter::_str
std::ostream * _str
Definition: LogControl.h:53
zypp::str::Format
Convenient building of std::string with boost::format.
Definition: String.h:250