Skip to content

Commit

Permalink
Console Log added
Browse files Browse the repository at this point in the history
  • Loading branch information
burakhalefoglu committed Jun 26, 2024
1 parent a2340f4 commit e6d4467
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<PackageReference Include="RabbitMQ.Client" Version="6.4.0" />
<PackageReference Include="Refit" Version="6.3.2" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1"/>
<PackageReference Include="Serilog.Formatting.Elasticsearch" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Http" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.MicrosoftTeams" Version="0.2.1" />
Expand Down
14 changes: 14 additions & 0 deletions Core/CrossCuttingConcerns/Logging/Serilog/Loggers/ConsoleLogger.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Serilog;

namespace Core.CrossCuttingConcerns.Logging.Serilog.Loggers;

public class ConsoleLogger : LoggerServiceBase
{
public ConsoleLogger()
{
var seriLogConfig = new LoggerConfiguration()
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}")
.CreateLogger();
Logger = seriLogConfig;
}
}

0 comments on commit e6d4467

Please sign in to comment.