1
0
mirror of synced 2024-07-01 08:17:39 +00:00
Tapeti/Tapeti.Serilog/TapetiSeriLogger.cs
Mark van Renswoude 74985e45de Fixed all ReSharper issues
Some are silly, like the "member not used" for public interfaces. The comments everywhere are ugly, sorry, but it keeps the possibly important issues visible without a dependency on some ReSharper annotations package.
2018-12-19 20:50:56 +01:00

42 lines
1.1 KiB
C#

using System;
using ISeriLogger = Serilog.ILogger;
// ReSharper disable UnusedMember.Global
namespace Tapeti.Serilog
{
public class TapetiSeriLogger: ILogger
{
private readonly ISeriLogger seriLogger;
public TapetiSeriLogger(ISeriLogger seriLogger)
{
this.seriLogger = seriLogger;
}
public void Connect(TapetiConnectionParams connectionParams)
{
// method not yet used in Tapeti
seriLogger.Information("Trying to connected to " + connectionParams.HostName);
}
public void ConnectFailed(TapetiConnectionParams connectionParams)
{
// method not yet used in Tapeti
seriLogger.Error("Could not connect to " + connectionParams.HostName);
}
public void ConnectSuccess(TapetiConnectionParams connectionParams)
{
// method not yet used in Tapeti
seriLogger.Information("Succesfull connected to " + connectionParams.HostName);
}
public void HandlerException(Exception e)
{
seriLogger.Error(e, "Exception handled by Tapeti");
}
}
}