#include <CeylanLogChannel.h>
Public Types | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
LogChannel (const std::string &name) | |
Creates a named Log channel. | |
virtual | ~LogChannel () throw () |
Basic virtual destructor. | |
virtual void | addMessage (LogMessage &message, bool check=true) |
Add a new Log message to this channel. | |
virtual const std::string | getName () const |
Returns this channel's name. | |
virtual MessageCount | getMessageCount () const |
Returns the number of messages this channel currently gathered. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns a user-friendly description of the state of this object. | |
Static Public Member Functions | |
static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
Returns a user-friendly description of this list of pointers to text displayable instances. | |
static TextOutputFormat | GetOutputFormat () |
Returns the current overall text format to be used by TextDisplayable instances. | |
static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
Protected Attributes | |
std::string | _name |
This channel's name. | |
std::list< LogMessage * > | _messages |
Chronologically-ordered set of messages for this Log channel. | |
Static Protected Attributes | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Private Types | |
typedef Ceylan::Uint32 | MessageCount |
Designates a number of log messages. | |
Private Member Functions | |
LogChannel (const LogChannel &source) | |
Copy constructor made private to ensure that it will be never called. | |
LogChannel & | operator= (const LogChannel &source) |
Assignment operator made private to ensure that it will be never called. | |
Friends | |
class | LogAggregator |
Aggregators must able to access to messages of log channels. | |
class | LogAggregatorHTML |
Necessary, since friend relationships are not inherited apparently. |
Definition at line 63 of file CeylanLogChannel.h.
typedef Ceylan::Uint32 Ceylan::Log::LogChannel::MessageCount [private] |
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
LogChannel::LogChannel | ( | const std::string & | name | ) | [explicit] |
Creates a named Log channel.
Definition at line 48 of file CeylanLogChannel.cc.
References CEYLAN_LOG, and Ceylan::toString().
LogChannel::~LogChannel | ( | ) | throw () [virtual] |
Basic virtual destructor.
Definition at line 59 of file CeylanLogChannel.cc.
References _messages, _name, CEYLAN_LOG, and Ceylan::toString().
Ceylan::Log::LogChannel::LogChannel | ( | const LogChannel & | source | ) | [private] |
Copy constructor made private to ensure that it will be never called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
void LogChannel::addMessage | ( | LogMessage & | message, | |
bool | check = true | |||
) | [virtual] |
Add a new Log message to this channel.
message | the log message to record | |
check | if true, raises a LogException if this added message's channel does not match this channel. |
LogException | if the operation failed. |
Reimplemented in Ceylan::Log::ObjectChannel.
Definition at line 81 of file CeylanLogChannel.cc.
References _messages, _name, CEYLAN_LOG, generalUtils::false, Ceylan::Log::LogMessage::getChannelName(), Ceylan::Log::LogMessage::toString(), Ceylan::toString(), and generalUtils::true.
Referenced by Ceylan::Log::LogAggregator::createBasicChannelFrom(), and Ceylan::Log::LogAggregator::transferChannel().
LogChannel::MessageCount LogChannel::getMessageCount | ( | ) | const [virtual] |
Returns the number of messages this channel currently gathered.
Definition at line 129 of file CeylanLogChannel.cc.
References _messages.
const string LogChannel::getName | ( | ) | const [virtual] |
Returns this channel's name.
Definition at line 120 of file CeylanLogChannel.cc.
References _name.
Referenced by Ceylan::Log::LogAggregator::findObjectChannel(), Ceylan::Log::LogAggregator::removeChannel(), Ceylan::Log::LogAggregator::transferChannel(), Ceylan::Log::LogAggregatorHTML::write(), and Ceylan::Log::LogAggregatorHTML::WriteChannelHeader().
TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().
LogChannel& Ceylan::Log::LogChannel::operator= | ( | const LogChannel & | source | ) | [private] |
Assignment operator made private to ensure that it will be never called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
Ceylan::VerbosityLevels | level = Ceylan::high | |||
) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
displayables | a list of pointers to TextDisplayable instances/ | |
level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
const string LogChannel::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
level | the requested verbosity level. |
Implements Ceylan::TextDisplayable.
Reimplemented in Ceylan::Log::ObjectChannel.
Definition at line 143 of file CeylanLogChannel.cc.
References _messages, _name, CEYLAN_LOG, Ceylan::formatStringList(), and Ceylan::low.
Referenced by Ceylan::Log::LogAggregator::transferChannel(), Ceylan::Log::LogAggregatorRaw::write(), Ceylan::Log::LogAggregatorHTML::write(), and Ceylan::Log::LogAggregatorConsole::write().
friend class LogAggregator [friend] |
Aggregators must able to access to messages of log channels.
Definition at line 72 of file CeylanLogChannel.h.
friend class LogAggregatorHTML [friend] |
Necessary, since friend relationships are not inherited apparently.
Definition at line 80 of file CeylanLogChannel.h.
std::list<LogMessage *> Ceylan::Log::LogChannel::_messages [protected] |
Chronologically-ordered set of messages for this Log channel.
Definition at line 183 of file CeylanLogChannel.h.
Referenced by Ceylan::Log::ObjectChannel::addMessage(), addMessage(), getMessageCount(), Ceylan::Log::ObjectChannel::toString(), toString(), Ceylan::Log::LogAggregator::transferChannel(), Ceylan::Log::LogAggregatorHTML::write(), ~LogChannel(), and Ceylan::Log::ObjectChannel::~ObjectChannel().
std::string Ceylan::Log::LogChannel::_name [protected] |
This channel's name.
Definition at line 165 of file CeylanLogChannel.h.
Referenced by Ceylan::Log::ObjectChannel::addMessage(), addMessage(), getName(), Ceylan::Log::ObjectChannel::ObjectChannel(), Ceylan::Log::ObjectChannel::toString(), toString(), ~LogChannel(), and Ceylan::Log::ObjectChannel::~ObjectChannel().
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().