Go to the documentation of this file.
12 #ifndef ZYPP_BASE_LOGCONTROL_H
13 #define ZYPP_BASE_LOGCONTROL_H
48 virtual void writeOut(
const std::string & formated_r )
49 { (*_str) << formated_r << std::endl; }
116 virtual std::string
format(
const std::string & ,
121 const std::string & );
157 void setLineWriter(
const shared_ptr<LineWriter> & writer_r );
172 TmpLineWriter(
const shared_ptr<LineWriter> & writer_r = shared_ptr<LineWriter>() )
181 template<
class TLineWriter>
201 std::ostream &
operator<<( std::ostream &
str,
const LogControl & obj );
209 #endif // ZYPP_BASE_LOGCONTROL_H
StreamLineWriter(std::ostream &str_r)
TmpLineWriter(TLineWriter *_allocated_r)
Convenience ctor taking over ownership of an allocated LineWriter.
void setLineFormater(const shared_ptr< LineFormater > &formater_r)
Assign a LineFormater.
TmpLineWriter(const shared_ptr< LineWriter > &writer_r=shared_ptr< LineWriter >())
log::LineWriter LineWriter
std::ostream & operator<<(std::ostream &str, const Flags< TEnum > &obj)
Maintain logfile related options.
If you want to log the (formated) loglines by yourself, derive from this, and overload writeOut.
LogLevel
Definition of log levels.
shared_ptr< LineWriter > _writer
Easy-to use interface to the ZYPP dependency resolver.
shared_ptr< LineWriter > getLineWriter() const
Get the current LineWriter.
virtual void writeOut(const std::string &formated_r)
virtual void writeOut(const std::string &)
LogControl()
Default ctor: Singleton.
friend std::ostream & operator<<(std::ostream &str, const LogControl &obj)
void logToStdErr()
Log to std::err.
Turn on excessive logging for the lifetime of this object.
void logNothing()
Turn off logging.
Exchange LineWriter for the lifetime of this object.
void setLineWriter(const shared_ptr< LineWriter > &writer_r)
Assign a LineWriter.
String related utilities and Regular expression matching.
FileLineWriter(const Pathname &file_r, mode_t mode_r=0)
Base class for ostream based LineWriter.
void logfile(const Pathname &logfile_r)
Set path for the logfile.
static LogControl instance()
Singleton access.