1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/base/LogControl.h
12 #ifndef ZYPP_BASE_LOGCONTROL_H
13 #define ZYPP_BASE_LOGCONTROL_H
17 #include "zypp/base/PtrTypes.h"
18 #include "zypp/Pathname.h"
20 ///////////////////////////////////////////////////////////////////
22 { /////////////////////////////////////////////////////////////////
23 ///////////////////////////////////////////////////////////////////
25 { /////////////////////////////////////////////////////////////////
27 ///////////////////////////////////////////////////////////////////
29 // CLASS NAME : LogControl
31 /** Maintain logfile related options.
32 * \note A Singleton using a Singleton implementation class,
33 * that's why there is no _pimpl like in other classes.
37 friend std::ostream & operator<<( std::ostream & str, const LogControl & obj );
40 /** Singleton access. */
41 static LogControl instance()
42 { return LogControl(); }
45 /** Return path to the logfile.
46 * An emty pathname for std::err.
48 const Pathname & logfile() const;
50 /** Set path for the logfile.
51 * An emty pathname for std::err.
52 * \throw if \a logfile_r is not usable.
54 void logfile( const Pathname & logfile_r );
57 /** Turn on excessive logging for the lifetime of this object.*/
65 /** Default ctor: Singleton */
69 ///////////////////////////////////////////////////////////////////
71 /** \relates LogControl Stream output */
72 std::ostream & operator<<( std::ostream & str, const LogControl & obj );
74 /////////////////////////////////////////////////////////////////
76 ///////////////////////////////////////////////////////////////////
77 /////////////////////////////////////////////////////////////////
79 ///////////////////////////////////////////////////////////////////
80 #endif // ZYPP_BASE_LOGCONTROL_H