#include <Logger.hpp>
Public Types | |
enum | Type { TYPE_INFORMATION = 0, TYPE_WARNING, TYPE_ERROR } |
Type of a log entry. More... | |
enum | Category { CATEGORY_CORE = 0, CATEGORY_INPUT, CATEGORY_RENDERER, CATEGORY_AUDIO, CATEGORY_NETWORK, CATEGORY_GAME, CATEGORY_OTHER } |
Category of a log entry. More... | |
Public Member Functions | |
Logger (const std::string &filename) | |
Constructor. | |
~Logger () | |
Destructor. | |
template<typename T> | |
Logger & | operator<< (const T &value) |
Logger & | operator<< (std::ostream &(*fn)(std::ostream &)) |
Print a stream modifier to the log. | |
Logger & | operator<< (std::ios &(*fn)(std::ios &)) |
Print a stream modifier to the log. | |
Logger & | operator<< (std::ios_base &(*fn)(std::ios_base &)) |
Print a stream modifier to the log. | |
Logger & | operator<< (const Type type) |
Print the type of a log entry to the log. | |
Logger & | operator<< (const Category category) |
Print the category of a log entry to the log. | |
void | printHeader () |
Print headers in the log file. | |
Private Attributes | |
std::ofstream | m_stream |
Output stream. |
syBR::Core::Logger::Logger | ( | const std::string & | filename | ) |
Constructor.
filename | Name of the log file (stored in the log/ subdirectory) |
syBR::Core::Logger::~Logger | ( | ) |
Destructor.
Logger& syBR::Core::Logger::operator<< | ( | const T & | value | ) | [inline] |
Logger& syBR::Core::Logger::operator<< | ( | std::ostream &(*)(std::ostream &) | fn | ) | [inline] |
Print a stream modifier to the log.
fn | Stream modifier to be written to the log |
Logger& syBR::Core::Logger::operator<< | ( | std::ios &(*)(std::ios &) | fn | ) | [inline] |
Print a stream modifier to the log.
fn | Stream modifier to be written to the log |
Logger& syBR::Core::Logger::operator<< | ( | std::ios_base &(*)(std::ios_base &) | fn | ) | [inline] |
Print a stream modifier to the log.
fn | Stream modifier to be written to the log |
Print the type of a log entry to the log.
type | Type of the log entry to be written next |
Print the category of a log entry to the log.
category | Category of the log entry to be written next |
void syBR::Core::Logger::printHeader | ( | ) |
Print headers in the log file.
The headers consist of the following items:
std::ofstream syBR::Core::Logger::m_stream [private] |
Output stream.
Copyright © 2008 by Sebastien Frippiat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:33 2008