|
#include <FileLogEngine.h>
Public Member Functions | |
| FileLogEngine (const fs::path &fileName) | |
| ~FileLogEngine () override | |
| Destructor. | |
| void | saveMessage (const Logger::UMessage &message) override |
| void | reset () override |
Public Member Functions inherited from sptk::LogEngine | |
| virtual void | saveMessage (const Logger::UMessage &message)=0 |
| LogEngine (const String &logEngineName) | |
| ~LogEngine () noexcept override | |
| virtual void | reset () |
| void | options (int ops) |
| size_t | options () const |
| void | option (int options, bool flag) |
| void | priority (LogPriority prt) |
| virtual void | minPriority (LogPriority prt) |
| virtual LogPriority | minPriority () const |
Public Member Functions inherited from sptk::Thread | |
| Thread (const String &name, const std::shared_ptr< ThreadManager > &threadManager=nullptr) | |
| virtual | ~Thread () |
| virtual void | run () |
| bool | running () const |
| virtual void | threadFunction ()=0 |
| virtual void | terminate () |
| virtual void | onThreadExit () |
| virtual bool | terminated () |
| virtual void | join () |
| Id | id () const |
| const String & | name () const |
| virtual bool | sleep_for (std::chrono::milliseconds interval) |
| virtual bool | sleep_until (const DateTime ×tamp) |
Additional Inherited Members | |
Public Types inherited from sptk::Thread | |
| using | Id = std::thread::id |
Static Public Member Functions inherited from sptk::LogEngine | |
| static String | priorityName (LogPriority prt) |
| static LogPriority | priorityFromName (const String &prt) |
Protected Member Functions inherited from sptk::LogEngine | |
| void | threadFunction () override |
| void | log (Logger::UMessage &message) |
| void | shutdown () noexcept |
A log stored in the regular file.
A simplest possible way to implement logging. The log file is created automatically if it doesn't exist.
|
explicit |
Constructor
Creates a new log object based on the file name. If this file doesn't exist - it will be created.
| fileName | Log file name |
|
overridevirtual |
Restarts the log
The current log content is cleared. The file is recreated.
Reimplemented from sptk::LogEngine.
|
overridevirtual |
Stores or sends log message to actual destination
| message | Log message |
Implements sptk::LogEngine.