#include <Logger.h>
|
void | addLogger (const std::string &name, const std::string &filename, std::string format) |
| It sets the logger using a default implementation. More...
|
|
void | addLoggerFromFile (const std::string &filename) |
| It sets the logger configuration from a given file. More...
|
|
bool | exists (const std::string &name) |
| Checks if exists a logger registered with the given name. More...
|
|
void | log (const std::string &message, const std::string &channel, severity_level severity) |
| It logs a given string message, channel and severity. More...
|
|
void | removeAllLoggers () |
| It removes all added loggers. More...
|
|
Definition at line 59 of file Logger.h.
Enumerator |
---|
trace |
|
debug |
|
info |
|
warning |
|
error |
|
fatal |
|
Definition at line 68 of file Logger.h.
te::core::Logger::Logger |
( |
| ) |
|
|
private |
Singleton constructor must be private or protected.
te::core::Logger::~Logger |
( |
| ) |
|
|
private |
Singleton destructor must be private or protected.
te::core::Logger::Logger |
( |
Logger const & |
| ) |
|
|
private |
Singleton copy constructor must be private or protected.
void te::core::Logger::addLogger |
( |
const std::string & |
name, |
|
|
const std::string & |
filename, |
|
|
std::string |
format |
|
) |
| |
It sets the logger using a default implementation.
- Parameters
-
name | The name of the logger. |
filename | The name of the log file. |
format | The format string of the logger. |
- Exceptions
-
- Note
- The logs will be stored in the given file name. If the file already exists, the logs will be appended to the end of the file.
void te::core::Logger::addLoggerFromFile |
( |
const std::string & |
filename | ) |
|
It sets the logger configuration from a given file.
- Parameters
-
filename | The name of the configuration file. |
- Exceptions
-
std::exception | If the configuration file is doesn't load. |
bool te::core::Logger::exists |
( |
const std::string & |
name | ) |
|
Checks if exists a logger registered with the given name.
- Parameters
-
name | The name to be checked. |
- Returns
- True if a logger with the given name, false if not.
static Logger& te::core::Logger::instance |
( |
| ) |
|
|
static |
It returns a reference to the singleton instance.
- Returns
- A reference to the singleton instance.
void te::core::Logger::log |
( |
const std::string & |
message, |
|
|
const std::string & |
channel, |
|
|
severity_level |
severity |
|
) |
| |
It logs a given string message, channel and severity.
- Parameters
-
message | The string message to be logged. |
channel | The channel name that will receive the message. |
severity | The severity of the logged message. |
Singleton copy assignment operator must be private or protected.
void te::core::Logger::removeAllLoggers |
( |
| ) |
|
It removes all added loggers.
Impl* te::core::Logger::m_pimpl |
|
private |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/core/logger/Logger.h