The logstream has a logger and level that are used for logging requests. The level of the stream is compared against the current level of the logger to determine if the request should be processed.
Public Member Functions | |
logstream_base (const log4cxx::LoggerPtr &logger, const log4cxx::LevelPtr &level) | |
Create new instance. | |
virtual | ~logstream_base () |
Destructor. | |
void | insert (std::ios_base &(*manip)(std::ios_base &)) |
Insertion operator for std::fixed and similar manipulators. | |
int | precision () |
get precision. | |
int | width () |
get width. | |
int | precision (int newval) |
set precision. | |
int | width (int newval) |
set width. | |
int | fill () |
Get fill character. | |
int | fill (int newval) |
Set fill character. | |
std::ios_base::fmtflags | flags (std::ios_base::fmtflags newflags) |
Set flags. | |
std::ios_base::fmtflags | setf (std::ios_base::fmtflags newflags, std::ios_base::fmtflags mask) |
Set flags. | |
std::ios_base::fmtflags | setf (std::ios_base::fmtflags newflags) |
Set flags. | |
void | end_message () |
end of message action. | |
void | setLevel (const LevelPtr &level) |
Set the level. | |
bool | isEnabled () const |
Returns true if the current level is the same or high as the level of logger at time of construction or last setLevel. | |
bool | isEnabledFor (const LevelPtr &level) const |
Returns if logger is currently enabled for the specified level. | |
void | setLocation (const log4cxx::spi::LocationInfo &location) |
Sets the location for subsequent log requests. | |
bool | set_stream_state (std::ios_base &os, int &fillchar) |
Sets the state of the embedded stream (if any) to the state of the formatting info. | |
Static Public Member Functions | |
static logstream_base & | endmsg (logstream_base &) |
end of message manipulator, triggers logging. | |
static logstream_base & | nop (logstream_base &) |
no-operation manipulator, Used to avoid ambiguity with VC6. | |
Protected Member Functions | |
virtual void | log (LoggerPtr &logger, const LevelPtr &level, const log4cxx::spi::LocationInfo &location)=0 |
Dispatches the pending log request. | |
virtual void | erase ()=0 |
Erase any content in the message construction buffer. | |
virtual void | get_stream_state (std::ios_base &base, std::ios_base &mask, int &fill, bool &fillSet) const =0 |
Copy state of embedded stream (if any) to value and mask instances of std::ios_base and return fill character value. | |
virtual void | refresh_stream_state ()=0 |
Classes | |
class | logstream_ios_base |
Minimal extension of std::ios_base to allow creation of embedded IO states. |
|
Create new instance.
|
|
Destructor.
|
|
end of message action.
|
|
end of message manipulator, triggers logging.
|
|
Erase any content in the message construction buffer.
Implemented in logstream, wlogstream, and ulogstream. |
|
Set fill character.
|
|
Get fill character.
|
|
Set flags. see std::ios_base. |
|
Copy state of embedded stream (if any) to value and mask instances of std::ios_base and return fill character value.
Implemented in logstream, wlogstream, and ulogstream. |
|
Insertion operator for std::fixed and similar manipulators.
|
|
Returns true if the current level is the same or high as the level of logger at time of construction or last setLevel.
|
|
Returns if logger is currently enabled for the specified level.
|
|
Dispatches the pending log request.
Implemented in logstream, wlogstream, and ulogstream. |
|
no-operation manipulator, Used to avoid ambiguity with VC6.
|
|
set precision. This should be used in preference to inserting an std::setprecision(n) since the other requires construction of an STL stream which may be expensive. |
|
get precision.
|
|
Implemented in logstream, wlogstream, and ulogstream. |
|
Sets the state of the embedded stream (if any) to the state of the formatting info.
|
|
Set flags. see std::ios_base. |
|
Set flags. see std::ios_base. |
|
Set the level.
|
|
Sets the location for subsequent log requests.
|
|
set width. This should be used in preference to inserting an std::setw(n) since the other requires construction of an STL stream which may be expensive. |
|
get width.
|