Skip to content

Commit

Permalink
change version
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinebou12 committed Jun 7, 2023
1 parent 70da799 commit fc85bda
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Expand Up @@ -8,7 +8,7 @@ on:
version:
description: 'Version to build'
required: true
default: '1.0.2'
default: '1.0.3'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Expand Up @@ -49,7 +49,7 @@ Task("SonarBegin")
Name = "Serilog.Sinks.SentrySDK",
ArgumentCustomization = args => args
.Append($"/o:olsh-github"),
Version = "1.0.0.0"
Version = "1.0.3.0"
});
});

Expand Down
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>A Sentry sink for Serilog</Description>
<VersionPrefix>1.0.2</VersionPrefix>
<VersionPrefix>1.0.3</VersionPrefix>
<Authors>Antoine Boucher</Authors>
<TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
9 changes: 9 additions & 0 deletions src/Serilog.Sinks.SentrySDK/SentrySink.cs
Expand Up @@ -292,6 +292,10 @@ public class SentrySink : ILogEventSink
/// <param name="logEvent">The log event to emit.</param>
public void Emit(LogEvent logEvent)
{
if (logEvent == null)
{
return;
}
var level = GetSentryLevel(logEvent);
var transaction = _sentrySdkWrapper.StartTransaction(
name: _transactionName,
Expand Down Expand Up @@ -357,6 +361,11 @@ public void Emit(LogEvent logEvent)
/// <returns>The Sentry level.</returns>
private static SentryLevel GetSentryLevel(LogEvent logEvent)
{
if (logEvent == null)
{
return SentryLevel.Error;
}

return logEvent.Level switch
{
LogEventLevel.Verbose => SentryLevel.Debug,
Expand Down
2 changes: 1 addition & 1 deletion src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>A Sentry sink for Serilog</Description>
<VersionPrefix>1.0.2</VersionPrefix>
<VersionPrefix>1.0.3</VersionPrefix>
<Authors>Antoine Boucher</Authors>
<TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down

0 comments on commit fc85bda

Please sign in to comment.