Zappy Server
C++ game server: world, rules, scheduler, network
Loading...
Searching...
No Matches
ILogSink Class Referenceabstract

Output destination for a fully-formatted log line (Strategy pattern). More...

#include <ILogSink.hpp>

+ Inheritance diagram for ILogSink:
+ Collaboration diagram for ILogSink:

Public Member Functions

virtual ~ILogSink ()=default
 
virtual void write (LogLevel level, const std::string &line)=0
 Write one already-formatted line if level passes the sink's threshold.
 

Detailed Description

Output destination for a fully-formatted log line (Strategy pattern).

The Logger formats the line; each sink decides whether to write it based on its own minimum level. This lets the file keep everything (Debug) while the console stays readable (Info). Swap sinks without touching Logger.

Definition at line 14 of file ILogSink.hpp.

Constructor & Destructor Documentation

◆ ~ILogSink()

virtual ILogSink::~ILogSink ( )
virtualdefault

Member Function Documentation

◆ write()

virtual void ILogSink::write ( LogLevel  level,
const std::string &  line 
)
pure virtual

Write one already-formatted line if level passes the sink's threshold.

Implemented in CompositeSink, ConsoleSink, and FileSink.


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