mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
lots of different things ;)
This commit is contained in:
parent
c42518b34e
commit
4ae268b8e5
71 changed files with 526 additions and 1229 deletions
|
@ -3,6 +3,7 @@ using Ninject;
|
|||
using NLog;
|
||||
using NLog.Targets;
|
||||
using NLog.Targets.Wrappers;
|
||||
using NzbDrone.Common;
|
||||
using PetaPoco;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
|
@ -18,19 +19,15 @@ namespace NzbDrone.Core.Instrumentation
|
|||
_database = database;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected override void Write(LogEventInfo logEvent)
|
||||
{
|
||||
var log = new Log();
|
||||
log.Time = logEvent.TimeStamp;
|
||||
log.Message = logEvent.FormattedMessage;
|
||||
|
||||
if (logEvent.UserStackFrame != null)
|
||||
{
|
||||
log.Method = logEvent.UserStackFrame.GetMethod().Name;
|
||||
}
|
||||
|
||||
log.Method = logEvent.UserStackFrame.GetMethod().Name;
|
||||
log.Logger = logEvent.LoggerName;
|
||||
|
||||
if (log.Logger.StartsWith("NzbDrone."))
|
||||
|
@ -57,7 +54,6 @@ namespace NzbDrone.Core.Instrumentation
|
|||
|
||||
log.Level = logEvent.Level.Name;
|
||||
|
||||
|
||||
_database.Insert(log);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue