#include <Log.h>
Definition at line 42 of file Log.h.
◆ MessageType
Enumerator |
---|
DebugInfo | Message with some debug information.
|
Info | Information to user.
|
Warning | Warning information.
|
Error | Error information while executing something.
|
User | User specific message.
|
Definition at line 45 of file Log.h.
◆ Log()
◆ ~Log()
◆ getOutput()
const std::string & dyno::Log::getOutput |
( |
| ) |
|
|
static |
Get the filename of log.
Definition at line 81 of file Log.cpp.
◆ instance()
Log * dyno::Log::instance |
( |
| ) |
|
|
static |
◆ outputThread()
void dyno::Log::outputThread |
( |
| ) |
|
|
private |
◆ sendMessage()
void dyno::Log::sendMessage |
( |
MessageType | type, |
|
|
const std::string & | text ) |
|
static |
Add a new message to log.
- Parameters
-
type | Type of the new message. |
text | Message. |
Definition at line 41 of file Log.cpp.
◆ setLevel()
Set minimum level of message to be logged to file.
Definition at line 62 of file Log.cpp.
◆ setOutput()
void dyno::Log::setOutput |
( |
const std::string & | filename | ) |
|
|
static |
Open file where to log the messages.
Definition at line 67 of file Log.cpp.
◆ setUserReceiver()
void dyno::Log::setUserReceiver |
( |
void(* | userFunc )(const Message &) | ) |
|
|
static |
Set user function to receive newly sent messages to logger.
Definition at line 57 of file Log.cpp.
◆ writeMessage()
void dyno::Log::writeMessage |
( |
MessageType | level, |
|
|
const char * | format, |
|
|
| ... ) |
|
private |
◆ mCondition
std::condition_variable dyno::Log::mCondition |
|
private |
◆ mRunning
◆ mThread
std::thread dyno::Log::mThread |
|
private |
◆ mtx
std::mutex dyno::Log::mtx |
|
private |
◆ receiver
void(* dyno::Log::receiver)(const Message &) = nullptr |
|
staticprivate |
◆ sLogInstance
std::atomic< Log * > dyno::Log::sLogInstance = nullptr |
|
staticprivate |
◆ sLogLevel
◆ sMessageQueue
◆ sOutputFile
std::string dyno::Log::sOutputFile |
|
staticprivate |
◆ sOutputStream
std::ofstream dyno::Log::sOutputStream |
|
staticprivate |
The documentation for this class was generated from the following files:
- D:/Peridyno/peridyno/src/Framework/Log.h
- D:/Peridyno/peridyno/src/Framework/Log.cpp