Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
ConsoleLogOutputter Class Reference

Write log to console. More...

#include <LogOutputters.h>

Inheritance diagram for ConsoleLogOutputter:
Collaboration diagram for ConsoleLogOutputter:

Public Member Functions

 ConsoleLogOutputter ()=default
 ~ConsoleLogOutputter () override=default
void open (const char *title) override
 Open the outputter.
void close () override
 Close the outputter.
void show (bool showIfEmpty) override
 Show the outputter.
bool write (LogLevel level, const char *message) override
 Write a message with level.
void flush () const
Public Member Functions inherited from ILogOutputter
Public Member Functions inherited from IInterface
virtual ~IInterface ()=default
 Interface destructor does nothing.

Detailed Description

Write log to console.

This outputter writes output to the console. The level for each message is ignored.

Constructor & Destructor Documentation

◆ ConsoleLogOutputter()

ConsoleLogOutputter::ConsoleLogOutputter ( )
default

◆ ~ConsoleLogOutputter()

ConsoleLogOutputter::~ConsoleLogOutputter ( )
overridedefault

Member Function Documentation

◆ close()

void ConsoleLogOutputter::close ( )
overridevirtual

Close the outputter.

Close the outputter. Calling this method on an already closed outputter must have no effect.

Implements ILogOutputter.

◆ flush()

void ConsoleLogOutputter::flush ( ) const

◆ open()

void ConsoleLogOutputter::open ( const char * title)
overridevirtual

Open the outputter.

Opens the outputter for writing. Calling this method on an already open outputter must have no effect.

Implements ILogOutputter.

◆ show()

void ConsoleLogOutputter::show ( bool showIfEmpty)
overridevirtual

Show the outputter.

Causes the output to become visible. This generally only makes sense for a logger in a graphical user interface. Other implementations will do nothing. Iff showIfEmpty is false then the implementation may optionally only show the log if it's not empty.

Implements ILogOutputter.

◆ write()

bool ConsoleLogOutputter::write ( LogLevel level,
const char * message )
overridevirtual

Write a message with level.

Writes message, which has the given level, to a log. If this method returns true then Log will stop passing the message to all outputters in the outputter chain, otherwise it continues. Most implementations should return true.

Implements ILogOutputter.


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