Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::logging::Logging Struct Reference

#include <logging.hpp>

Static Public Member Functions

static void Init (std::string const &name_pattern="bertini_%N.log", std::string const &format="%Message%", unsigned rotation_size=10 *1024 *1024, severity_level const &new_level=severity_level::error)
 Initialize Bertini2 logging (call once); adds a rotating log file and sets the level.
static void AddFile (std::string const &name_pattern, std::string const &format, unsigned rotation_size, bool auto_flush=true)
 Add a rotating log-file sink with the given name pattern, format, and rotation size.
static void SetLevel (severity_level const &new_level)
 trivial logger-provided severity levels are

Detailed Description

\class Logging

Provided as an interface to the underlying logging library.

Highlight functions:

  Init -- a "call-it-once" kinda function
  SetFilter
  AddFile

I have no idea how to remove a file, once you have done AddFile.  If this is something you need, contact silviana amethyst, and ask her to provide such a function.  She practices YAGNI, and she hadn't NI yet.

There is Init, with all defaults, so you should totally call it to initialize all logging facilities for Bertini2.  Failure to do so produces pure screen output.

[TimeStamp%]:

Member Function Documentation

◆ AddFile()

void bertini::logging::Logging::AddFile ( std::string const & name_pattern,
std::string const & format,
unsigned rotation_size,
bool auto_flush = true )
inlinestatic

Add a rotating log-file sink with the given name pattern, format, and rotation size.

◆ Init()

void bertini::logging::Logging::Init ( std::string const & name_pattern = "bertini_%N.log",
std::string const & format = "%Message%",
unsigned rotation_size = 10*1024*1024,
severity_level const & new_level = severity_level::error )
inlinestatic

Initialize Bertini2 logging (call once); adds a rotating log file and sets the level.

◆ SetLevel()

void bertini::logging::Logging::SetLevel ( severity_level const & new_level)
inlinestatic

trivial logger-provided severity levels are

trace, debug, info, warning, error, fatal