Logger class to provide interface to basic functions of the logger.
More...
#include <Logger.h>
|
using | LogLevel = spdlog::level::level_enum |
| Typalias for log levels.
|
|
|
static void | create (std::string &filename) |
| create a logger writing to the file system
|
|
static void | create (std::ostream &oss=std::cout) |
| create a logger with an arbitrary ostream.
|
|
static void | unregister () |
| removes the logger.
|
|
static auto | get () |
| Get a pointer to the actual logger object.
|
|
Logger class to provide interface to basic functions of the logger.
You can create the spdlog's logger or delete it using the provided functions.
◆ create() [1/2]
static void autopas::Logger::create |
( |
std::ostream & |
oss = std::cout | ) |
|
|
inlinestatic |
create a logger with an arbitrary ostream.
default is std::cout
- Parameters
-
◆ create() [2/2]
static void autopas::Logger::create |
( |
std::string & |
filename | ) |
|
|
inlinestatic |
create a logger writing to the file system
- Parameters
-
◆ get()
static auto autopas::Logger::get |
( |
| ) |
|
|
inlinestatic |
Get a pointer to the actual logger object.
- Returns
- Pointer to logger.
◆ unregister()
static void autopas::Logger::unregister |
( |
| ) |
|
|
inlinestatic |
removes the logger.
This should only be done at teardown of the simulation or for tests. logging after the logger has been removed and no new logger has been defined will lead to undefined behavior!!!
The documentation for this class was generated from the following file: