#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...
|
|
|
Impl * | m_pimpl |
|
std::pair< boost::log::attribute_set::iterator, bool > | m_process |
|
std::pair< boost::log::attribute_set::iterator, bool > | m_processId |
|
std::pair< boost::log::attribute_set::iterator, bool > | m_threadId |
|
Definition at line 61 of file Logger.h.
◆ severity_level
Enumerator |
---|
trace | |
debug | |
info | |
warning | |
error | |
fatal | |
Definition at line 70 of file Logger.h.
◆ Logger() [1/2]
te::core::Logger::Logger |
( |
| ) |
|
|
private |
Singleton constructor must be private or protected.
◆ ~Logger()
te::core::Logger::~Logger |
( |
| ) |
|
|
private |
Singleton destructor must be private or protected.
◆ Logger() [2/2]
te::core::Logger::Logger |
( |
Logger const & |
| ) |
|
|
private |
Singleton copy constructor must be private or protected.
◆ addLogger()
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.
◆ addLoggerFromFile()
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. |
◆ exists()
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.
◆ instance()
static Logger& te::core::Logger::instance |
( |
| ) |
|
|
static |
It returns a reference to the singleton instance.
- Returns
- A reference to the singleton instance.
◆ log()
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. |
◆ operator=()
Singleton copy assignment operator must be private or protected.
◆ removeAllLoggers()
void te::core::Logger::removeAllLoggers |
( |
| ) |
|
It removes all added loggers.
◆ m_pimpl
Impl* te::core::Logger::m_pimpl |
|
private |
◆ m_process
std::pair< boost::log::attribute_set::iterator, bool > te::core::Logger::m_process |
|
private |
◆ m_processId
std::pair< boost::log::attribute_set::iterator, bool > te::core::Logger::m_processId |
|
private |
◆ m_threadId
std::pair< boost::log::attribute_set::iterator, bool > te::core::Logger::m_threadId |
|
private |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/core/logger/Logger.h