PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | List of all members
Arp::System::Commons::Diagnostics::Logging::LogSettings Class Reference

This class is used to compound all log settings of the application for initializing the log engine. More...

#include <LogSettings.hpp>

Public Types

using Impl = Log4Arp::LogSettings
 

Public Member Functions

 LogSettings (const String &iniFile, LogLevel logLevel=LogLevel::None)
 Constructs an LogSettings instance. More...
 
 LogSettings (LogLevel logLevel, bool consoleLogging=true, const String &logFile=String::Empty, const String &layoutPattern=String::Empty)
 Constructs an LogSettings instance. More...
 
 LogSettings (const LogSettings &arg)
 Default copy constructor. More...
 
 LogSettings (LogSettings &&arg) noexcept
 Default move constructor. More...
 
LogSettingsoperator= (const LogSettings &arg)
 Default copy-assignment operator. More...
 
LogSettingsoperator= (LogSettings &&arg) noexcept
 Default move-assignment operator. More...
 
 ~LogSettings (void)
 Default destructor.
 
bool HasRootLogLevel (void) const
 Determines if this settings specify the root log level. More...
 
bool HasIniFile (void) const
 Determines if this settings specify the .ini file of the log engine. More...
 
bool HasLogFile (void) const
 Determines if this settings specify the logging output file. More...
 
LogLevel GetRootLogLevel (void) const
 Gets the root log level. More...
 
String GetIniFile (void) const
 Gets the path of the logging .ini file. More...
 
String GetLogFile (void) const
 Gets the path of the logging output file. More...
 
String GetLayoutPattern (void) const
 Gets the logging messages layout pattern in log4cplus syntax. More...
 
bool IsConsoleLoggingEnabled (void) const
 Specifies if console logging should be enabled. More...
 
Impl & GetImpl (void)
 For internal use only. More...
 
const Impl & GetImpl (void) const
 

Detailed Description

This class is used to compound all log settings of the application for initializing the log engine.

Constructor & Destructor Documentation

◆ LogSettings() [1/4]

Arp::System::Commons::Diagnostics::Logging::LogSettings::LogSettings ( const String iniFile,
LogLevel  logLevel = LogLevel::None 
)

Constructs an LogSettings instance.

Parameters
iniFileThe ini file to read the log settings from.
logLevelThe log level of the application.

◆ LogSettings() [2/4]

Arp::System::Commons::Diagnostics::Logging::LogSettings::LogSettings ( LogLevel  logLevel,
bool  consoleLogging = true,
const String logFile = String::Empty,
const String layoutPattern = String::Empty 
)

Constructs an LogSettings instance.

Parameters
logLevelThe log level of the application.
logFileThe log file to write the logging to.
consoleLoggingEnabled logging to the console.
layoutPatternThe layoout pattern of the log messages.

◆ LogSettings() [3/4]

Arp::System::Commons::Diagnostics::Logging::LogSettings::LogSettings ( const LogSettings arg)
default

Default copy constructor.

Parameters
argThe argument to copy.

◆ LogSettings() [4/4]

Arp::System::Commons::Diagnostics::Logging::LogSettings::LogSettings ( LogSettings &&  arg)
defaultnoexcept

Default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ GetImpl()

const LogSettings::Impl & Arp::System::Commons::Diagnostics::Logging::LogSettings::GetImpl ( void  )

For internal use only.

Returns
The impl instance.

◆ GetIniFile()

String Arp::System::Commons::Diagnostics::Logging::LogSettings::GetIniFile ( void  ) const

Gets the path of the logging .ini file.

Returns
String::Empty if the path was not specified, otherwise the specified path.

◆ GetLayoutPattern()

String Arp::System::Commons::Diagnostics::Logging::LogSettings::GetLayoutPattern ( void  ) const

Gets the logging messages layout pattern in log4cplus syntax.

Returns
The specified pattern or a default pattern if it was not specified.

◆ GetLogFile()

String Arp::System::Commons::Diagnostics::Logging::LogSettings::GetLogFile ( void  ) const

Gets the path of the logging output file.

Returns
String::Empty if the path was not specified, otherwise the specified path.

◆ GetRootLogLevel()

LogLevel Arp::System::Commons::Diagnostics::Logging::LogSettings::GetRootLogLevel ( void  ) const

Gets the root log level.

Returns
LogLevel::None if the root log level was not specified, otherwise the specified value.

◆ HasIniFile()

bool Arp::System::Commons::Diagnostics::Logging::LogSettings::HasIniFile ( void  ) const

Determines if this settings specify the .ini file of the log engine.

Returns
true if this settings specify the .ini file of the log engine, otherwise false.

◆ HasLogFile()

bool Arp::System::Commons::Diagnostics::Logging::LogSettings::HasLogFile ( void  ) const

Determines if this settings specify the logging output file.

Returns
true if the logging output file is specified, otherwise false.

◆ HasRootLogLevel()

bool Arp::System::Commons::Diagnostics::Logging::LogSettings::HasRootLogLevel ( void  ) const

Determines if this settings specify the root log level.

Returns
true if the root log level is specified, otherwise false.

◆ IsConsoleLoggingEnabled()

bool Arp::System::Commons::Diagnostics::Logging::LogSettings::IsConsoleLoggingEnabled ( void  ) const

Specifies if console logging should be enabled.

Returns
true if console logging should be enabled, otherwise false.

◆ operator=() [1/2]

LogSettings & Arp::System::Commons::Diagnostics::Logging::LogSettings::operator= ( const LogSettings arg)
default

Default copy-assignment operator.

Parameters
argThe argument to copy.
Returns
This instance.

◆ operator=() [2/2]

LogSettings & Arp::System::Commons::Diagnostics::Logging::LogSettings::operator= ( LogSettings &&  arg)
defaultnoexcept

Default move-assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

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