Skip to content

Commit

Permalink
Added debug log store
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Jun 21, 2017
1 parent df7a01b commit 69f5bf5
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/Server/Bit.Owin/Implementations/DebugLogStore.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Threading.Tasks;
using Bit.Core.Contracts;
using Bit.Core.Models;
using System.Diagnostics;

namespace Bit.Owin.Implementations
{
public class DebugLogStore : ILogStore
{
private readonly IContentFormatter _formatter;

public DebugLogStore(IContentFormatter formatter)
{
_formatter = formatter;
}

protected DebugLogStore()
{

}

public virtual void SaveLog(LogEntry logEntry)
{
Debug.WriteLine(_formatter.Serialize(logEntry) + Environment.NewLine);
}

public virtual async Task SaveLogAsync(LogEntry logEntry)
{
Debug.WriteLine(_formatter.Serialize(logEntry) + Environment.NewLine);
}
}
}

0 comments on commit 69f5bf5

Please sign in to comment.