Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends
icl_core::logging::LogStream Class Reference

Implements a thread-safe logging framework. More...

#include <LogStream.h>

Inheritance diagram for icl_core::logging::LogStream:
Inheritance graph
[legend]

List of all members.

Classes

struct  ThreadStreamInfo

Public Member Functions

void addOutputStream (LogOutputStream *new_stream)
icl_core::logging::LogLevel getLogLevel () const
 Get the log level of the current thread.
icl_core::logging::LogLevel initialLogLevel () const
 Get the initial log level of this log stream.
bool isActive () const
 Checks if the log stream is active.
 LogStream (const icl_core::String &name, icl_core::logging::LogLevel initial_level=cDEFAULT_LOG_LEVEL)
icl_core::String name () const
 Return the name of the log stream.
const char * nameCStr () const
void printConfiguration () const
 Prints the list of connected log output streams.
void removeOutputStream (LogOutputStream *stream)
void setActive (bool active=true)
 Activates or deactivates the log stream.
icl_core::logging::ThreadStreamthreadStream (icl_core::logging::LogLevel log_level)
 ~LogStream ()

Private Types

typedef std::list
< ThreadStreamInfo
ThreadStreamMap

Private Member Functions

void releaseThreadStream (icl_core::logging::ThreadStream *thread_stream)

Private Attributes

bool m_active
icl_core::logging::LogLevel m_initial_level
Semaphore m_mutex
icl_core::String m_name
std::set< LogOutputStream * > m_output_stream_list
ThreadStreamMap m_thread_stream_map

Static Private Attributes

static ThreadId m_empty_thread_id

Friends

class LoggingManager
class ThreadStream

Detailed Description

Implements a thread-safe logging framework.

Definition at line 54 of file LogStream.h.


Member Typedef Documentation

Definition at line 179 of file LogStream.h.


Constructor & Destructor Documentation

Creates a new logstream which is not yet connected to any log output stream.

Definition at line 39 of file LogStream.cpp.

Definition at line 54 of file LogStream.cpp.


Member Function Documentation

Adds a new log output stream to the log stream. All log messages are additionally written to this new log output stream.

Definition at line 72 of file LogStream.cpp.

Get the log level of the current thread.

Definition at line 66 of file LogStream.cpp.

Get the initial log level of this log stream.

Definition at line 75 of file LogStream.h.

bool icl_core::logging::LogStream::isActive ( ) const [inline]

Checks if the log stream is active.

Definition at line 78 of file LogStream.h.

Return the name of the log stream.

Definition at line 68 of file LogStream.h.

const char* icl_core::logging::LogStream::nameCStr ( ) const [inline]

Definition at line 69 of file LogStream.h.

Prints the list of connected log output streams.

Definition at line 156 of file LogStream.cpp.

Definition at line 252 of file LogStream.cpp.

Removes a log output stream from the log stream. Log messages are no longer written to this log output stream.

Definition at line 81 of file LogStream.cpp.

void icl_core::logging::LogStream::setActive ( bool  active = true) [inline]

Activates or deactivates the log stream.

Definition at line 72 of file LogStream.h.

Returns the underlying thread stream for the current thread.

This function should usually not be used directly. It is mainly intended to be used indirectly via the LOGGING_* log macros.

Definition at line 90 of file LogStream.cpp.


Friends And Related Function Documentation

friend class LoggingManager [friend]

Definition at line 56 of file LogStream.h.

friend class ThreadStream [friend]

Definition at line 57 of file LogStream.h.


Member Data Documentation

Definition at line 183 of file LogStream.h.

Definition at line 189 of file LogStream.h.

Definition at line 163 of file LogStream.h.

Definition at line 187 of file LogStream.h.

Definition at line 182 of file LogStream.h.

Definition at line 184 of file LogStream.h.

Definition at line 180 of file LogStream.h.


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


fzi_icl_core
Author(s):
autogenerated on Thu Jun 6 2019 20:22:26