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 { /////////////////////////////////////////////////////////////////
32 ///////////////////////////////////////////////////////////////////
34 // CLASS NAME : LogControl
36 /** Maintain logfile related options.
41 friend std::ostream & operator<<( std::ostream & str, const LogControl & obj );
42 typedef logger::LogControlImpl Impl;
45 /** Singleton access. */
46 static LogControl instance();
51 /** Return path to the logfile.
52 * An emty pathname for std::err.
54 const Pathname & logfile() const;
56 /** Set path for the logfile.
57 * An emty pathname for std::err.
58 * \throw if \a logfile_r is not usable.
60 void logfile( const Pathname & logfile_r );
63 /** Turn on excessive logging for the lifetime of this object.*/
71 /** Default ctor: Singleton*/
73 /** Pointer to implementation */
74 RW_pointer<Impl> _pimpl;
76 ///////////////////////////////////////////////////////////////////
78 /** \relates LogControl Stream output */
79 std::ostream & operator<<( std::ostream & str, const LogControl & obj );
81 /////////////////////////////////////////////////////////////////
83 ///////////////////////////////////////////////////////////////////
84 /////////////////////////////////////////////////////////////////
86 ///////////////////////////////////////////////////////////////////
87 #endif // ZYPP_BASE_LOGCONTROL_H