|
AGX Dynamics 2.42.3.0
|
Logger is a class for writing information, debug info, warnings but also throwing exceptions in a stream-alike way. More...
#include <Logger.h>
Inheritance diagram for agx::Logger:Public Member Functions | |
| Logger () | |
| ADD_NOTIFY_FUNCTIONALITY_TO_CLASS () | |
| agx::String | getLogFilename () const |
| bool | openLogfile (const agx::String &path, bool overwrite, bool closeAndOpen) |
| Open a new log file. | |
| void | setLogNotifyLevel (Notify::NotifyLevel l) |
| Set the lowest level of messages that will be written to the logger system. | |
Public Member Functions inherited from agx::Singleton | |
| Singleton (int priority=DEFAULT_PRIORITY) | |
| Default constructor. | |
| virtual std::string | getClassName () const =0 |
| int | getPriority () const |
| Return the shutdown priority of the singleton instance. | |
| virtual void | shutdown ()=0 |
| Implement this method to cleanup your Singleton class. | |
Static Public Member Functions | |
| static Logger * | instance (void) |
| Return the singleton object. | |
Protected Member Functions | |
| void | shutdown () override |
| Implement this method to cleanup your Singleton class. | |
Protected Member Functions inherited from agx::Singleton | |
| virtual | ~Singleton () |
| Destructor. | |
| void | _shutdown () |
Additional Inherited Members | |
Public Types inherited from agx::Singleton | |
| enum | Priority { HIGHEST_PRIORITY = 2147483647 , LOWEST_PRIORITY = 10000 , DEFAULT_PRIORITY = 1073741824 } |
| Specifies the ranges of the priority which can be assigned to a singleton at the time of creation. More... | |
Logger is a class for writing information, debug info, warnings but also throwing exceptions in a stream-alike way.
Always use the macros LOGGER_*() This class is thread safe. It should ONLY be called from AGX threads. If you create a thread of your own, and call LOGGER it will certainly crash. AGX has a "mainThread", which is the thread from which agx::init() was called. This is also part of the "safe zone".
| agx::Logger::Logger | ( | ) |
| agx::Logger::ADD_NOTIFY_FUNCTIONALITY_TO_CLASS | ( | ) |
| agx::String agx::Logger::getLogFilename | ( | ) | const |
|
static |
Return the singleton object.
| bool agx::Logger::openLogfile | ( | const agx::String & | path, |
| bool | overwrite, | ||
| bool | closeAndOpen | ||
| ) |
Open a new log file.
| path | - Path to a new log file |
| overwrite | - if false, a version number will be added to the filename: test.log.1, test.log.2 etc. |
| closeAndOpen | - if true, an opened log file will be closed and the new path will be opened. If false, nothing will happen, false will be returned |
| void agx::Logger::setLogNotifyLevel | ( | Notify::NotifyLevel | l | ) |
Set the lowest level of messages that will be written to the logger system.
|
overrideprotectedvirtual |
Implement this method to cleanup your Singleton class.
Implements agx::Singleton.