47 : m_log_level(-1), m_message_level(0)
67 stream_list_type::iterator it;
69 for ( it=m_stream.begin(); it!=m_stream.end(); ++it )
82 m_stream.push_front(s);
93 stream_list_type::iterator it =
94 std::find(m_stream.begin(), m_stream.end(), s);
96 if ( it!=m_stream.end() )
108 m_stream.push_front(s);
128 m_log_level = lvl.
get();
137 if (m_message_level <= m_log_level)
139 stream_list_type::iterator it;
141 for ( it=m_stream.begin(); it!=m_stream.end(); ++it )
153 m_message_level = that.
get();
155 if (m_message_level <= m_log_level)
179 return log << std::endl;
184 (log <<
"\n").flush();
CLAW_LOGGER_EXPORT void set_level(int lvl)
Change the level of log.
CLAW_LOGGER_EXPORT log_system & lendl(log_system &log)
Add a new line caracter to a logger and flush it.
std::string get_string() const
Get the prefix.
Some basic classes for logging.
CLAW_LOGGER_EXPORT void remove(const stream_type *s)
Remove a stream.
CLAW_LOGGER_EXPORT void clear()
Delete the streams.
CLAW_LOGGER_EXPORT void set(stream_type *s)
Set the output stream.
Set the level of the next message for logger_system::operator<<().
CLAW_LOGGER_EXPORT void merge(stream_type *s)
Add an other output stream.
A class implementing a logging system.
Base class for streams accepting log output.
int get() const
Get the level value.
CLAW_LOGGER_EXPORT log_system()
Default constructor.
log_system logger
The default log system provided by claw.
This is the main namespace.
CLAW_LOGGER_EXPORT void flush()
Flush all log streams.
CLAW_LOGGER_EXPORT ~log_system()
Destructor.