Back to index

nux  3.0.0
Public Member Functions | Protected Member Functions | Private Attributes
nux::logging::LogStreamBuffer Class Reference
Collaboration diagram for nux::logging::LogStreamBuffer:
Collaboration graph

List of all members.

Public Member Functions

 LogStreamBuffer (Level severity, std::string const &module, std::string const &filename, int line_number)

Protected Member Functions

virtual int sync ()

Private Attributes

Level severity_
std::string module_
std::string filename_
int line_number_
std::time_t timestamp_

Detailed Description

Definition at line 273 of file Logger.cpp.

Constructor & Destructor Documentation

nux::logging::LogStreamBuffer::LogStreamBuffer ( Level  severity,
std::string const &  module,
std::string const &  filename,
int  line_number 

Definition at line 307 of file Logger.cpp.

  : std::stringbuf(std::ios_base::out)
  , severity_(severity)
  , module_(module)
  , filename_(filename)
  , line_number_(line_number)
  , timestamp_(std::time(0))

Member Function Documentation

int nux::logging::LogStreamBuffer::sync ( ) [protected, virtual]

Definition at line 320 of file Logger.cpp.

  std::string message = str();
  // reset the stream
  // Only log the message if there is something there.
  if (!message.empty())
    Writer::Instance().WriteMessage(severity_, module_,
                                    filename_, line_number_,
                                    timestamp_, message);
  return 0; // success

Here is the call graph for this function:

Member Data Documentation

Definition at line 285 of file Logger.cpp.

Definition at line 286 of file Logger.cpp.

Definition at line 284 of file Logger.cpp.

Definition at line 283 of file Logger.cpp.

Definition at line 287 of file Logger.cpp.

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