12 #ifndef ZYPP_BASE_LOGCONTROL_H 13 #define ZYPP_BASE_LOGCONTROL_H 48 void writeOut(
const std::string & formated_r )
override 49 { (*_str) << formated_r << std::endl; }
116 virtual std::string format(
const std::string & ,
121 const std::string & );
130 std::string format(
const std::string & ,
135 const std::string & )
override;
143 void setLineFormater(
const shared_ptr<LineFormater> & formater_r );
150 void enableLogForwardingMode (
bool enable =
true );
159 void logfile(
const Pathname & logfile_r );
160 void logfile(
const Pathname & logfile_r, mode_t mode_r );
169 void emergencyShutdown();
176 static void notifyFork();
179 void logRawLine ( std::string &&line );
183 shared_ptr<LineWriter> getLineWriter()
const;
190 void setLineWriter(
const shared_ptr<LineWriter> & writer_r );
205 TmpLineWriter(
const shared_ptr<LineWriter> & writer_r = shared_ptr<LineWriter>() )
206 : _writer(
LogControl::instance().getLineWriter() )
214 template<
class TLineWriter>
216 : _writer(
LogControl::instance().getLineWriter() )
242 #endif // ZYPP_BASE_LOGCONTROL_H LogControl()
Default ctor: Singleton.
LogLevel
Definition of log levels.
Base class for ostream based LineWriter.
String related utilities and Regular expression matching.
Exchange LineWriter for the lifetime of this object.
static LogControl instance()
Singleton access.
void setLineWriter(const shared_ptr< LineWriter > &writer_r)
Assign a LineWriter.
std::ostream & operator<<(std::ostream &str, const SetTracker< TSet > &obj)
relates: SetTracker Stream output
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
StreamLineWriter(std::ostream &str_r)
Turn on excessive logging for the lifetime of this object.
Maintain logfile related options.
If you want to log the (formated) loglines by yourself, derive from this, and overload writeOut...
TmpLineWriter(TLineWriter *_allocated_r)
Convenience ctor taking over ownership of an allocated LineWriter.
void writeOut(const std::string &formated_r) override
shared_ptr< LineWriter > _writer
TmpLineWriter(const shared_ptr< LineWriter > &writer_r=shared_ptr< LineWriter >())
virtual void writeOut(const std::string &)
Easy-to use interface to the ZYPP dependency resolver.