DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
LoggerConfiguration.h
Go to the documentation of this file.
1#pragma once
2#include "Common.h"
3#include "System/String.h"
5
6namespace DotNetDupe {
7 namespace Extensions {
8 namespace Logging {
9
14 bool EnableRollover = false;
16 long long MaxFileSizeInBytes = 5 * 1024 * 1024;
19 };
20
53
58
59 }
60 }
61}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74
LogLevel
Defines logging severity levels.
Definition ILogger.h:15
@ Information
Logs that track the general flow of the application.
Definition ILogger.h:21
LogLevel ParseLogLevel(const DotNetDupe::System::String &str)
Parses a case-insensitive string into a corresponding LogLevel enumeration value.
Configuration settings for file rotation and archival. Microsoft.Extensions.Logging.
long long MaxFileSizeInBytes
Maximum size in bytes of the primary log file before rotation (default: 5 MB).
bool EnableRollover
Indicates whether file rotation is enabled when file size threshold is reached.
int MaxBackupFiles
Maximum number of rotated backup log files to retain (default: 3).
Encapsulates logging system configuration options.
static LoggerConfiguration LoadFromFile(const DotNetDupe::System::String &filePath)
Loads logging configuration options from a JSON file.
DotNetDupe::System::String TimestampFormat
Timestamp formatting template using strftime syntax (e.g. "%Y-%m-%d %H:%M:%S").
DotNetDupe::System::String FilePath
Destination file path when file logging is configured.
bool IsJsonFormat
Specifies whether to serialize log messages as structured JSON objects.
DotNetDupe::System::String PlainTextFormat
Plain text formatting template (e.g. "{Timestamp} [{Level}] [{Category}] {Message}...
FileRolloverConfig Rollover
File rotation settings.
static LoggerConfiguration LoadFromJson(const DotNetDupe::System::String &jsonContent)
Loads logging configuration options from a raw JSON string.
LogLevel MinLevel
Minimum log level required for a message to be recorded.