NoTeX 1.0.0
A modern noteworthy LaTeX template
Loading...
Searching...
No Matches
CustomFormatter Class Reference

Single-line plog formatter: "[time] [LEVEL] [file:func:line] msg". More...

#include <notex/logging.hpp>

Static Public Member Functions

static plog::util::nstring header ()
 Header line prepended once when a log file is created.
static plog::util::nstring format (const plog::Record &record)
 Format a single log record as one newline-terminated line.

Detailed Description

Single-line plog formatter: "[time] [LEVEL] [file:func:line] msg".

Replaces plog's default multi-field format with one self-contained, newline-terminated line per record, matching plog::TxtFormatter's trailing-newline convention so records never run together: [YYYY-MM-DD HH:MM:SS.mmm] [LEVEL] [file.cpp:function:line] message

Definition at line 51 of file logging.hpp.

Member Function Documentation

◆ format()

plog::util::nstring CustomFormatter::format ( const plog::Record & record)
inlinestatic

Format a single log record as one newline-terminated line.

Parameters
recordLog record to format.
Returns
Formatted "[time] [LEVEL] [file:func:line] message\n" string.

Definition at line 67 of file logging.hpp.

◆ header()

plog::util::nstring CustomFormatter::header ( )
inlinestatic

Header line prepended once when a log file is created.

Returns
Empty string; no header is emitted.

Definition at line 58 of file logging.hpp.


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