DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
AggregateLogger.h
Go to the documentation of this file.
1
#pragma once
2
#include "
Common.h
"
3
#include "
Extensions/Logging/ILogger.h
"
4
5
6
namespace
DotNetDupe
{
7
namespace
Extensions
{
8
namespace
Logging
{
9
14
class
AggregateLogger
:
public
ILogger
{
15
private
:
16
struct
Impl;
17
DotNetDupe::System::SmartPointer<Impl>
m_pImpl;
18
19
public
:
21
DOTNETDUPE_API
AggregateLogger
();
22
24
DOTNETDUPE_API
~AggregateLogger
()
override
;
25
28
DOTNETDUPE_API
void
AddLogger
(
const
DotNetDupe::System::SmartPointer<ILogger>
& pLogger);
29
33
DOTNETDUPE_API
void
Log
(
LogLevel
logLevel,
const
DotNetDupe::System::String
& message)
override
;
34
39
DOTNETDUPE_API
void
Log
(
LogLevel
logLevel,
const
DotNetDupe::System::String
& message,
40
const
DotNetDupe::System::Collections::Generic::Dictionary<DotNetDupe::System::String, DotNetDupe::System::String>
& properties)
override
;
41
45
DOTNETDUPE_API
bool
IsEnabled
(
LogLevel
logLevel)
const override
;
46
};
47
48
}
49
}
50
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
DOTNETDUPE_API
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition
Common.h:20
ILogger.h
DotNetDupe::Extensions::Logging::AggregateLogger::AggregateLogger
AggregateLogger()
Initializes an empty AggregateLogger composite.
Definition
AggregateLogger.cpp:13
DotNetDupe::Extensions::Logging::AggregateLogger::AddLogger
void AddLogger(const DotNetDupe::System::SmartPointer< ILogger > &pLogger)
Adds a child ILogger destination to the dispatch list.
Definition
AggregateLogger.cpp:20
DotNetDupe::Extensions::Logging::AggregateLogger::Log
void Log(LogLevel logLevel, const DotNetDupe::System::String &message) override
Dispatches a plain text message to all attached child loggers.
Definition
AggregateLogger.cpp:28
DotNetDupe::Extensions::Logging::AggregateLogger::~AggregateLogger
~AggregateLogger() override
Destructor releasing aggregated loggers.
DotNetDupe::Extensions::Logging::AggregateLogger::IsEnabled
bool IsEnabled(LogLevel logLevel) const override
Checks if any attached child logger is enabled for the specified level.
Definition
AggregateLogger.cpp:43
DotNetDupe::Extensions::Logging::ILogger
Represents a type used to perform logging.
Definition
ILogger.h:36
DotNetDupe::System::Collections::Generic::Dictionary
Represents a collection of keys and values.
Definition
Dictionary.h:66
DotNetDupe::System::SmartPointer
A unified smart pointer that supports both unique and shared ownership semantics.
Definition
SmartPointer.h:72
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::Extensions::Logging
Definition
AggregateLogger.h:8
DotNetDupe::Extensions::Logging::LogLevel
LogLevel
Defines logging severity levels.
Definition
ILogger.h:15
DotNetDupe::Extensions
Definition
IServiceCollection.h:8
DotNetDupe
Definition
IServiceCollection.h:7
Include
Extensions
Logging
AggregateLogger.h
Generated by
1.18.0