senf::log::FileTarget Class Reference
[Targets]

Log target writing to a log file. More...

#include <senf/Utils/Logger/FileTarget.hh>

Inheritance diagram for senf::log::FileTarget:
Inheritance graph
[legend]

List of all members.


Detailed Description

Log target writing to a log file.

The FileTarget will save all log messages in the given file. Messages will be appended at the end of the file.

senf::log::FileTarget target ("file.name");

// Route all messages to this file.
target.route();

After log files have been rotated, the reopen() member should be called to create a new log file.

Definition at line 61 of file FileTarget.hh.


Classes

struct   RegisterConsole

Public Member Functions

void  reopen ()
  Reopen log after log-file rotation.
void  reopen (std::string const &file)
  Reopen log under a new name.
std::string const &  filename () const
  Return current log file name.

Structors and default members

  FileTarget (std::string const &filename, std::string const &nodename="")
  Construct FileTarget writing to file.

Constructor & Destructor Documentation

senf::log::FileTarget::
FileTarget ( std::string const &  filename,
std::string const &  nodename = "" )

Construct FileTarget writing to file.

Definition at line 50 of file FileTarget.cc.


Member Function Documentation

std::string const & senf::log::FileTarget::
filename ()

Return current log file name.

Definition at line 90 of file FileTarget.cc.

void senf::log::FileTarget::
reopen ( std::string const &  file )

Reopen log under a new name.

Definition at line 80 of file FileTarget.cc.

void senf::log::FileTarget::
reopen ()

Reopen log after log-file rotation.

Definition at line 74 of file FileTarget.cc.


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