#include <Logger.h>
Public 型 | |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef std::basic_ostream < char_type, traits_type > | ostream_type |
typedef std::basic_streambuf < char_type, traits_type > | streambuf_type |
typedef coil::Mutex | Mutex |
typedef coil::Guard< Mutex > | Guard |
Public メソッド | |
log_stream (streambuf_type *sb, int levelmin, int levelmax, int level) | |
コンストラクタ | |
virtual void | header (int level) |
メッセージのヘッダ追加関数 | |
bool | setLevel (int level) |
ログレベル設定 | |
int | getLevel () const |
ログレベル取得 | |
void | enableLock () |
ロックモード設定 | |
void | disableLock () |
ロックモード解除 | |
ostream_type & | level (int level) |
ログストリームの取得 | |
bool | isValid (int level) const |
void | lock () |
ログロック取得 ロックモードが設定されている場合、ログのロックを取得する。 | |
void | unlock () |
ログロック解放 ロックモードが設定されている場合に、ログのロックを解放する。 | |
Static Public 変数 | |
static bool | m_lockEnable = true |
static Mutex | m_mutex |
Protected メソッド | |
~log_stream () | |
log_stream () | |
log_stream (const log_stream &x) | |
log_stream & | operator= (const log_stream &x) |
typedef _CharT coil::log_stream< _CharT, _Traits >::char_type |
typedef _Traits coil::log_stream< _CharT, _Traits >::traits_type |
typedef std::basic_ostream<char_type, traits_type> coil::log_stream< _CharT, _Traits >::ostream_type |
typedef std::basic_streambuf<char_type, traits_type> coil::log_stream< _CharT, _Traits >::streambuf_type |
typedef coil::Mutex coil::log_stream< _CharT, _Traits >::Mutex |
typedef coil::Guard<Mutex> coil::log_stream< _CharT, _Traits >::Guard |
coil::log_stream< _CharT, _Traits >::log_stream | ( | streambuf_type * | sb, | |
int | levelmin, | |||
int | levelmax, | |||
int | level | |||
) | [inline] |
コンストラクタ
コンストラクタ
streambuf | basic_streambuf 型オブジェクト | |
levelmin | ログレベルの最小値 | |
levelmax | ログレベルの最大値 | |
デフォルトのログレベル |
coil::log_stream< _CharT, _Traits >::~log_stream | ( | ) | [inline, protected] |
coil::log_stream< _CharT, _Traits >::log_stream | ( | ) | [protected] |
coil::log_stream< _CharT, _Traits >::log_stream | ( | const log_stream< _CharT, _Traits > & | x | ) | [protected] |
virtual void coil::log_stream< _CharT, _Traits >::header | ( | int | level | ) | [inline, virtual] |
bool coil::log_stream< _CharT, _Traits >::setLevel | ( | int | level | ) | [inline] |
ログレベル設定
ログレベルを設定する。
level | ログレベル |
int coil::log_stream< _CharT, _Traits >::getLevel | ( | ) | const [inline] |
ログレベル取得
ログレベルを所得する。
void coil::log_stream< _CharT, _Traits >::enableLock | ( | ) | [inline] |
ロックモード設定
ロックモードを有効にする。
void coil::log_stream< _CharT, _Traits >::disableLock | ( | ) | [inline] |
ロックモード解除
ロックモードを無効にする。
ostream_type& coil::log_stream< _CharT, _Traits >::level | ( | int | level | ) | [inline] |
ログストリームの取得
指定されたログレベルを判断し、ログストリームを取得する。 指定されたログレベルが設定されているログレベル以下の場合には、本クラスを 返す。 指定されたログレベルが設定されているログレベルを超えている場合には、 ダミーログクラスを返す。
level | 指定ログレベル |
bool coil::log_stream< _CharT, _Traits >::isValid | ( | int | level | ) | const [inline] |
void coil::log_stream< _CharT, _Traits >::lock | ( | ) | [inline] |
ログロック取得 ロックモードが設定されている場合、ログのロックを取得する。
void coil::log_stream< _CharT, _Traits >::unlock | ( | ) | [inline] |
ログロック解放 ロックモードが設定されている場合に、ログのロックを解放する。
log_stream& coil::log_stream< _CharT, _Traits >::operator= | ( | const log_stream< _CharT, _Traits > & | x | ) | [protected] |
bool coil::log_stream< _CharT, _Traits >::m_lockEnable = true [inline, static] |
coil::Mutex coil::log_stream< _CharT, _Traits >::m_mutex [inline, static] |