-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from datalust/dev
5.2.0 Release
- Loading branch information
Showing
12 changed files
with
114 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"version": "5.0.401", | ||
"version": "6.0.400", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,46 @@ | ||
using System.Linq; | ||
using System; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Serilog; | ||
using Serilog.Core; | ||
|
||
namespace Sample | ||
{ | ||
public static class Program | ||
{ | ||
public static void Main() | ||
public static async Task Main() | ||
{ | ||
// By sharing between the Seq sink and logger itself, | ||
// Seq API keys can be used to control the level of the whole logging pipeline. | ||
var levelSwitch = new LoggingLevelSwitch(); | ||
|
||
Log.Logger = new LoggerConfiguration() | ||
.MinimumLevel.ControlledBy(levelSwitch) | ||
.WriteTo.Console() | ||
.WriteTo.Seq("http://localhost:5341", controlLevelSwitch: levelSwitch) | ||
.CreateLogger(); | ||
try | ||
{ | ||
Log.Logger = new LoggerConfiguration() | ||
.MinimumLevel.ControlledBy(levelSwitch) | ||
.WriteTo.Console() | ||
.WriteTo.Seq("http://localhost:5341", controlLevelSwitch: levelSwitch) | ||
.CreateLogger(); | ||
|
||
Log.Information("Sample starting up"); | ||
Log.Information("Sample starting up"); | ||
|
||
foreach (var i in Enumerable.Range(0, 1000)) | ||
{ | ||
Log.Information("Running loop {Counter}, switch is at {Level}", i, levelSwitch.MinimumLevel); | ||
foreach (var i in Enumerable.Range(0, 100)) | ||
{ | ||
Log.Information("Running loop {Counter}, switch is at {Level}", i, levelSwitch.MinimumLevel); | ||
|
||
Thread.Sleep(1000); | ||
Log.Debug("Loop iteration done"); | ||
Thread.Sleep(1000); | ||
Log.Debug("Loop iteration done"); | ||
} | ||
} | ||
catch (Exception ex) | ||
{ | ||
Log.Error(ex, "Unhandled exception"); | ||
} | ||
finally | ||
{ | ||
await Log.CloseAndFlushAsync(); | ||
} | ||
|
||
Log.CloseAndFlush(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters