OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | List of all members
openstudio::LogSink Class Reference

#include <LogSink.hpp>

+ Inheritance diagram for openstudio::LogSink:

Public Member Functions

bool autoFlush () const
 get if messages are automatically flushed More...
 
boost::optional< boost::regex > channelRegex () const
 get the regular expression to match log channels More...
 
void disable ()
 disable the sink More...
 
void enable ()
 enable the sink More...
 
bool isEnabled () const
 is the sink enabled More...
 
boost::optional< LogLevel > logLevel () const
 get the logging level More...
 
void resetChannelRegex ()
 reset the regular expression to match log channels More...
 
void resetLogLevel ()
 reset the core logging level More...
 
void resetThreadId ()
 reset the thread id that messages are filtered by More...
 
void setAutoFlush (bool autoFlush)
 set if messages are automatically flushed More...
 
void setChannelRegex (const boost::regex &channelRegex)
 set the regular expression to match log channels More...
 
void setChannelRegex (const std::string &channelRegex)
 set the regular expression to match log channels More...
 
void setLogLevel (LogLevel logLevel)
 set the logging level More...
 
void setThreadId (std::thread::id threadId)
 set the thread id that messages are filtered by More...
 
std::thread::id threadId () const
 get the thread id that messages are filtered by More...
 

Protected Member Functions

 LogSink ()
 
 LogSink (const boost::shared_ptr< detail::LogSink_Impl > &impl)
 
void setStream (boost::shared_ptr< std::ostream > os)
 
boost::shared_ptr< LogSinkBackendsink () const
 

Detailed Description

LogSink is a class for managing sinks for log messages, e.g. files, streams, etc.

Constructor & Destructor Documentation

openstudio::LogSink::LogSink ( )
protected
openstudio::LogSink::LogSink ( const boost::shared_ptr< detail::LogSink_Impl > &  impl)
protected

Member Function Documentation

bool openstudio::LogSink::autoFlush ( ) const

get if messages are automatically flushed

boost::optional<boost::regex> openstudio::LogSink::channelRegex ( ) const

get the regular expression to match log channels

void openstudio::LogSink::disable ( )

disable the sink

void openstudio::LogSink::enable ( )

enable the sink

bool openstudio::LogSink::isEnabled ( ) const

is the sink enabled

boost::optional<LogLevel> openstudio::LogSink::logLevel ( ) const

get the logging level

void openstudio::LogSink::resetChannelRegex ( )

reset the regular expression to match log channels

void openstudio::LogSink::resetLogLevel ( )

reset the core logging level

void openstudio::LogSink::resetThreadId ( )

reset the thread id that messages are filtered by

void openstudio::LogSink::setAutoFlush ( bool  autoFlush)

set if messages are automatically flushed

void openstudio::LogSink::setChannelRegex ( const boost::regex &  channelRegex)

set the regular expression to match log channels

void openstudio::LogSink::setChannelRegex ( const std::string &  channelRegex)

set the regular expression to match log channels

void openstudio::LogSink::setLogLevel ( LogLevel  logLevel)

set the logging level

void openstudio::LogSink::setStream ( boost::shared_ptr< std::ostream >  os)
protected
void openstudio::LogSink::setThreadId ( std::thread::id  threadId)

set the thread id that messages are filtered by

boost::shared_ptr<LogSinkBackend> openstudio::LogSink::sink ( ) const
protected
std::thread::id openstudio::LogSink::threadId ( ) const

get the thread id that messages are filtered by