Stride Reference Manual  - generated for commit 9643b11
stride::util::LogUtils Class Reference

Utilities for logging (spdlog). More...

#include <LogUtils.h>

Collaboration diagram for stride::util::LogUtils:
Collaboration graph

Static Public Member Functions

static std::shared_ptr< spdlog::logger > CreateCliLogger (const std::string &logger_name, const std::string &file_name)
 Return a (not-yet-registered) commandline and file logger, without registering it. More...
 
static std::shared_ptr< spdlog::logger > CreateFileLogger (const std::string &logger_name, const std::string &file_name)
 Return a (not-yet-registered) file logger, without registering it. More...
 
static std::shared_ptr< spdlog::logger > CreateNullLogger (const std::string &logger_name="null_logger")
 Return a (not-yet-registered) null logger, without registering it. More...
 
static std::shared_ptr< spdlog::logger > CreateRotatingLogger (const std::string &logger_name, const std::string &file_name)
 Return a (not-yet-registered) rotating logger, without registering it. More...
 

Detailed Description

Utilities for logging (spdlog).

Definition at line 33 of file LogUtils.h.

Member Function Documentation

std::shared_ptr< spdlog::logger > stride::util::LogUtils::CreateCliLogger ( const std::string &  logger_name,
const std::string &  file_name 
)
static

Return a (not-yet-registered) commandline and file logger, without registering it.

The file, if it already exits is truncated when opened. Throws iff logger already registered or if spdlog throws.

Definition at line 32 of file LogUtils.cpp.

Referenced by stride::ControlHelper::InstallLogger().

Here is the caller graph for this function:

std::shared_ptr< spdlog::logger > stride::util::LogUtils::CreateFileLogger ( const std::string &  logger_name,
const std::string &  file_name 
)
static

Return a (not-yet-registered) file logger, without registering it.

The file, if it already exits is truncated when opened. Throws iff logger already registered or if spdlog throws.

Definition at line 53 of file LogUtils.cpp.

Referenced by stride::ControlHelper::InstallLogger().

Here is the caller graph for this function:

std::shared_ptr< logger > stride::util::LogUtils::CreateNullLogger ( const std::string &  logger_name = "null_logger")
static

Return a (not-yet-registered) null logger, without registering it.

Throws iff logger already registered or if spdlog throws.

Definition at line 71 of file LogUtils.cpp.

Referenced by stride::AbstractPopBuilder::AbstractPopBuilder(), stride::Population::Create(), geopop::Generator< ID >::Generator(), and geopop::Populator< ID >::Populator().

Here is the caller graph for this function:

std::shared_ptr< logger > stride::util::LogUtils::CreateRotatingLogger ( const std::string &  logger_name,
const std::string &  file_name 
)
static

Return a (not-yet-registered) rotating logger, without registering it.

Throws iff logger already registered or if spdlog throws.

Definition at line 88 of file LogUtils.cpp.

Referenced by stride::Population::Create().

Here is the caller graph for this function:


The documentation for this class was generated from the following files: