Skip to content

Commit

Permalink
Including EventId and Exception in LambdaLogger messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Karpala committed Feb 19, 2019
1 parent 23666e7 commit 8d25d2e
Show file tree
Hide file tree
Showing 5 changed files with 376 additions and 259 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public class LambdaLoggerOptions
private const string INCLUDE_LOG_LEVEL_KEY = "IncludeLogLevel";
private const string INCLUDE_CATEGORY_KEY = "IncludeCategory";
private const string INCLUDE_NEWLINE_KEY = "IncludeNewline";
private const string INCLUDE_EXCEPTION = "IncludeException";
private const string INCLUDE_EVENT_ID = "IncludeEventId";
private const string INCLUDE_EXCEPTION_KEY = "IncludeException";
private const string INCLUDE_EVENT_ID_KEY = "IncludeEventId";
private const string LOG_LEVEL_KEY = "LogLevel";

/// <summary>
Expand Down Expand Up @@ -128,12 +128,12 @@ public LambdaLoggerOptions(IConfiguration configuration, string loggingSectionNa
IncludeLogLevel = bool.Parse(includeLogLevelString);
}

if (TryGetString(loggerConfiguration, INCLUDE_EXCEPTION, out string includeExceptionString))
if (TryGetString(loggerConfiguration, INCLUDE_EXCEPTION_KEY, out string includeExceptionString))
{
IncludeException = bool.Parse(includeExceptionString);
}

if (TryGetString(loggerConfiguration, INCLUDE_EVENT_ID, out string includeEventIdString))
if (TryGetString(loggerConfiguration, INCLUDE_EVENT_ID_KEY, out string includeEventIdString))
{
IncludeEventId = bool.Parse(includeEventIdString);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
</PropertyGroup>

<ItemGroup>
<None Update="appsettings.exceptions.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="appsettings.wildcard.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Loading

0 comments on commit 8d25d2e

Please sign in to comment.