-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d02335e
commit e0c352b
Showing
25 changed files
with
215 additions
and
176 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
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,22 +1,36 @@ | ||
using Serilog; | ||
using Serilog.Formatting.Compact; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Hosting; | ||
using Microsoft.Extensions.Logging; | ||
using Serilog; | ||
|
||
namespace TelnetNegotiationCore.TestClient | ||
{ | ||
public class Program | ||
{ | ||
static async Task Main() | ||
static async Task Main(string[] args) | ||
{ | ||
var log = new LoggerConfiguration() | ||
.Enrich.FromLogContext() | ||
.WriteTo.File(new CompactJsonFormatter(), "LogResult.log") | ||
.WriteTo.Console() | ||
.MinimumLevel.Debug() | ||
.CreateLogger(); | ||
|
||
Log.Logger = log; | ||
var client = new MockPipelineClient(); | ||
await client.StartAsync("127.0.0.1", 4201); | ||
|
||
var builder = Host.CreateDefaultBuilder(args) | ||
.ConfigureServices(services => | ||
{ | ||
services.AddTransient<MockPipelineClient>(); | ||
}); | ||
|
||
var host = builder.ConfigureLogging(logging => | ||
{ | ||
logging.ClearProviders(); | ||
logging.AddSerilog(); | ||
logging.SetMinimumLevel(LogLevel.Debug); | ||
}).Build(); | ||
|
||
await host.Services.GetRequiredService<MockPipelineClient>().StartAsync("127.0.0.1", 4201); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.