paludis  Version 2.6.0
Public Member Functions | Friends | List of all members
paludis::Log Class Reference

#include <log.hh>

+ Inheritance diagram for paludis::Log:

Public Member Functions

 ~Log ()
void set_log_level (const LogLevel)
LogLevel log_level () const PALUDIS_ATTRIBUTE((warn_unused_result))
LogMessageHandler message (const std::string &id, const LogLevel, const LogContext) PALUDIS_ATTRIBUTE((warn_unused_result))
void set_log_stream (std::ostream *const)
void set_program_name (const std::string &)
- Public Member Functions inherited from paludis::Singleton< OurType_ >
 Singleton ()=default
 Singleton (const Singleton &)=delete
const Singletonoperator= (const Singleton &)=delete


class Singleton< Log >
class LogMessageHandler

Additional Inherited Members

- Static Public Member Functions inherited from paludis::Singleton< OurType_ >
static OurType_ * get_instance () PALUDIS_ATTRIBUTE((warn_unused_result))
static void destroy_instance ()

Detailed Description

Singleton class that handles log messages.

Constructor & Destructor Documentation

paludis::Log::~Log ( )

Destructor, to be called only by our InstantiationPolicy.

Member Function Documentation

LogLevel paludis::Log::log_level ( ) const

Fetch the current log level.

LogMessageHandler paludis::Log::message ( const std::string &  id,
const LogLevel  ,
const LogContext   

Log a message.

The return value can be appended to using LogMessageHandler::operator<<(). When the return value is destroyed (that is to say, at the end of the statement), the log message is written.

void paludis::Log::set_log_level ( const LogLevel  )

Only display messages of at least this level.

void paludis::Log::set_log_stream ( std::ostream *  const)

Change the log stream.

void paludis::Log::set_program_name ( const std::string &  )

Set our program name.

The documentation for this class was generated from the following file: