API Documentation
Loading...
Searching...
No Matches
LogManager Class Reference

A class that has any number of children that also feed into the log. Can be used to easily collect logs from a variaty of different streams. More...

#include <LogManager.h>

Inheritance diagram for LogManager:
[legend]
Collaboration diagram for LogManager:
[legend]

Public Types

enum  MoveMode { e_move , e_copy , e_ignore }
 

Public Member Functions

void addLog (const String &name, ProgressInfo *info)
 
virtual bool addMessage (const char *const, uint01=10) override
 
virtual bool addMessage (const LogMessage &) override
 
virtual bool addMessage (const String &, uint01=10) override
 
virtual bool addMessage (const TranslatedString &, uint01=10) override
 
void addStream (LogStream *stream, bool add_all) override
 
virtual void allowCancel (bool) override
 
ProgressInfodefaultLog () const
 
ProgressInfogetLog (const String &log_name) const
 
bool hasLog (const String &log_name) const
 
const Dictionary< String, ProgressInfo * > & logs ()
 
void logStartupInformation (const String &log) const
 
void readFromFile (BinaryFile &file)
 
void removeStream (LogStream *stream) override
 
virtual void setCancelRequest (bool) override
 
void setDefaultAsciiLogPath (const File &file, MoveMode mode)
 
virtual bool setProgress (fltp04) override
 
void writeToFile (BinaryFile &file, uint01 minimum_log_level, CompressionMode mode=CompressionMode::e_default_compression)
 
- Public Member Functions inherited from ProgressInfo
virtual bool cancelRequested () const
 
 ProgressInfo () noexcept
 
virtual ~ProgressInfo ()
 

Public Attributes

Dictionary< String, AsciiFileOutputStream * > m_ascii_streams
 
File m_default_ascii_log_path
 
Dictionary< String, ProgressInfo * > m_logs
 
Buffer< LogStream * > m_streams
 

Detailed Description

A class that has any number of children that also feed into the log. Can be used to easily collect logs from a variaty of different streams.


Member Enumeration Documentation

◆ MoveMode

enum MoveMode
Enumerator
e_move 
e_copy 
e_ignore 

Member Function Documentation

◆ addLog()

void addLog ( const String & name,
ProgressInfo * info )

◆ addMessage() [1/4]

virtual bool addMessage ( const char * const ,
uint01 = 10 )
overridevirtual

Implements ProgressInfo.

◆ addMessage() [2/4]

virtual bool addMessage ( const LogMessage & )
overridevirtual

Implements ProgressInfo.

◆ addMessage() [3/4]

virtual bool addMessage ( const String & ,
uint01 = 10 )
overridevirtual

Implements ProgressInfo.

◆ addMessage() [4/4]

virtual bool addMessage ( const TranslatedString & ,
uint01 = 10 )
overridevirtual

Implements ProgressInfo.

◆ addStream()

void addStream ( LogStream * stream,
bool add_all )
overridevirtual

Reimplemented from ProgressInfo.

◆ allowCancel()

virtual void allowCancel ( bool )
overridevirtual

Implements ProgressInfo.

◆ defaultLog()

ProgressInfo * defaultLog ( ) const
inline

◆ getLog()

ProgressInfo * getLog ( const String & log_name) const

◆ hasLog()

bool hasLog ( const String & log_name) const

◆ logs()

const Dictionary< String, ProgressInfo * > & logs ( )

◆ logStartupInformation()

void logStartupInformation ( const String & log) const

◆ readFromFile()

void readFromFile ( BinaryFile & file)

◆ removeStream()

void removeStream ( LogStream * stream)
overridevirtual

Reimplemented from ProgressInfo.

◆ setCancelRequest()

virtual void setCancelRequest ( bool )
overridevirtual

Reimplemented from ProgressInfo.

◆ setDefaultAsciiLogPath()

void setDefaultAsciiLogPath ( const File & file,
MoveMode mode )

◆ setProgress()

virtual bool setProgress ( fltp04 )
overridevirtual

Implements ProgressInfo.

◆ writeToFile()

void writeToFile ( BinaryFile & file,
uint01 minimum_log_level,
CompressionMode mode = CompressionMode::e_default_compression )

Member Data Documentation

◆ m_ascii_streams

◆ m_default_ascii_log_path

File m_default_ascii_log_path

◆ m_logs

Dictionary<String, ProgressInfo*> m_logs
mutable

◆ m_streams

Buffer<LogStream*> m_streams

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