Updated
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
|
||||
logger.LoggerSettings.CustomHeaderFormatter = null; // remove the lambda
|
||||
logger.LoggerSettings.HeaderTokens.AddCustomToken("AppName", x => "[JIJ BENT EEN BRASSER!]");
|
||||
logger.LoggerSettings.HeaderFormat = "{AppName} {LogType} {ts}";
|
||||
logger.LoggerSettings.HeaderFormat = "{AppName} {logtype} {ts}";
|
||||
|
||||
// Configure the client
|
||||
var centralOptions = new LogCentralOptions
|
||||
@@ -98,7 +98,7 @@
|
||||
// Now all EonaCat.Logger logs will be sent to LogCentral automatically
|
||||
await logger.LogAsync("This is a test log message sent to LogCentral!", ELogType.INFO).ConfigureAwait(false);
|
||||
|
||||
var jsonLogger = new JsonFileLoggerProvider().CreateLogger("MyCategory") as JsonFileLogger;
|
||||
var jsonLogger = new JsonFileLogger("Category", new JsonFileLoggerOptions { FileName = "test.json" });
|
||||
jsonLogger?.SetContext("CorrelationId", "abc-123");
|
||||
jsonLogger?.SetContext("UserId", "john.doe");
|
||||
jsonLogger?.LogInformation("User logged in");
|
||||
|
||||
Reference in New Issue
Block a user