Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
change_log_format.cpp File Reference
#include "shambase/stacktrace.hpp"
#include "shambase/term_colors.hpp"
#include "shamcmdopt/env.hpp"
#include "shamcmdopt/tty.hpp"
#include "shamcomm/logs.hpp"
#include "shamcomm/worldInfo.hpp"
+ Include dependency graph for change_log_format.cpp:

Go to the source code of this file.

Namespaces

namespace  logformatter
 Namespace for log formatters.
 
namespace  shamsys
 namespace for the system handling
 

Functions

std::string logformatter::style0_formatter_full (const logger::ReformatArgs &args)
 Log formatter for style 0, full details.
 
std::string logformatter::style0_formatter_simple (const logger::ReformatArgs &args)
 Log formatter for style 0, simple details.
 
std::string logformatter::style1_formatter_full (const logger::ReformatArgs &args)
 Log formatter for style 1, full details.
 
std::string logformatter::style1_formatter_simple (const logger::ReformatArgs &args)
 Log formatter for style 1, simple details.
 
std::string logformatter::style2_formatter_full (const logger::ReformatArgs &args)
 Log formatter for style 2, full details.
 
std::string logformatter::style2_formatter_simple (const logger::ReformatArgs &args)
 Log formatter for style 2, simple details.
 
std::string logformatter::style3_formatter_full (const logger::ReformatArgs &args)
 Log formatter for style 3, full details.
 
std::string logformatter::style3_formatter_simple (const logger::ReformatArgs &args)
 Log formatter for style 3, simple details.
 
std::string logformatter::style4_formatter_full (const logger::ReformatArgs &args)
 Log formatter for style 3, full details + time.
 
std::string logformatter::style4_formatter_simple (const logger::ReformatArgs &args)
 Log formatter for style 3, simple details + time.
 
void logformatter::exception_gen_callback (std::string msg)
 The callback called when an exception is thrown.
 
void shamsys::change_log_format ()
 Change the log formatter according to the SHAMLOGFORMATTER and SHAMLOG_ERR_ON_EXCEPT environment variables.
 

Variables

std::string SHAMLOGFORMATTER
 
std::string SHAMLOG_ERR_ON_EXCEPT
 

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file change_log_format.cpp.

Variable Documentation

◆ SHAMLOG_ERR_ON_EXCEPT

std::string SHAMLOG_ERR_ON_EXCEPT
Initial value:
"SHAMLOG_ERR_ON_EXCEPT", "1", "Enable logging of exceptions (default to 1)")
std::string getenv_str_default_register(const char *env_var, std::string default_val, std::string desc)
Get the content of the environment variable if it exist and register it documentation,...
Definition env.hpp:88

Definition at line 274 of file change_log_format.cpp.

◆ SHAMLOGFORMATTER

std::string SHAMLOGFORMATTER
Initial value:
"SHAMLOGFORMATTER", "3", "Change the log formatter (values :0-4) [default: 3]")

Definition at line 271 of file change_log_format.cpp.