AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
autopas::Logger Class Reference

Logger class to provide interface to basic functions of the logger. More...

#include <Logger.h>

Public Types

using LogLevel = spdlog::level::level_enum
 Typalias for log levels.
 

Static Public Member Functions

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.
 

Detailed Description

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.

Member Function Documentation

◆ 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
oss

◆ create() [2/2]

static void autopas::Logger::create ( std::string &  filename)
inlinestatic

create a logger writing to the file system

Parameters
filename

◆ 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: