glogging
Loading...
Searching...
No Matches
glogger.h File Reference
#include "gutsConventions.h"
#include "goptions.h"
#include "G4UIsession.hh"
#include <atomic>
#include <string>
#include <sstream>
#include <utility>
Include dependency graph for glogger.h:

Go to the source code of this file.

Data Structures

class  GLogger
 Handles structured logging with verbosity and debug levels. More...
 

Macros

#define FUNCTION_NAME   __func__ + std::string(" > ")
 Cross-platform macro that expands to a best-effort "pretty" function signature string.
 
#define SFUNCTION_NAME   __func__ + std::string(" > ")
 Portable macro that expands to the current function name (standard C++11 __func__).
 

Enumerations

enum  debug_type { NORMAL , CONSTRUCTOR , DESTRUCTOR }
 Classifies debug messages by intent. More...
 

Macro Definition Documentation

◆ FUNCTION_NAME

#define FUNCTION_NAME   __func__ + std::string(" > ")

This macro is used to annotate messages with the current function signature, which can be useful in diagnostics. The exact content is compiler-dependent:

  • On Clang/GCC it uses __PRETTY_FUNCTION__
  • On MSVC it uses __FUNCSIG__
  • Otherwise it falls back to __func__
Note
The resulting string includes a trailing " > " so callers can concatenate it directly.

Definition at line 32 of file glogger.h.

◆ SFUNCTION_NAME

#define SFUNCTION_NAME   __func__ + std::string(" > ")

This version is intentionally minimal and stable across compilers, but it does not include the full signature like FUNCTION_NAME().

Note
The resulting string includes a trailing " > " so callers can concatenate it directly.

Definition at line 44 of file glogger.h.

Enumeration Type Documentation

◆ debug_type

enum debug_type

This enum allows the debug stream to distinguish between:

  • Normal runtime debug output
  • Constructor tracing output
  • Destructor tracing output

The constructor/destructor variants are typically used to visualize object lifetime and ownership behavior in complex workflows.

Enumerator
NORMAL 
CONSTRUCTOR 
DESTRUCTOR 

Definition at line 59 of file glogger.h.