Fixed Exceptioneer, Launcher should run as priority normal

pull/4/head
kay.one 13 years ago
parent c753b315d8
commit badcfecb93

@ -8,15 +8,14 @@ namespace NzbDrone.Core.Instrumentation
{
public class ExceptioneerTarget : Target
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
protected override void Write(LogEventInfo logEvent)
{
if (logEvent.Exception == null)
throw new InvalidOperationException(
@"Missing Exception Object.. Please Use Logger.FatalException() or Logger.ErrorException() rather
than Logger.Fatal() and Logger.Error()");
if (!Debugger.IsAttached)
{
Logger.Trace("Sending Exception to Exceptioneer");
new Client
{
ApiKey = "43BBF60A-EB2A-4C1C-B09E-422ADF637265",

@ -24,7 +24,7 @@ namespace NzbDrone.Core.Instrumentation
public static void StartDbLogging()
{
#if Release
#if RELEASE
var exTarget = new ExceptioneerTarget();
LogManager.Configuration.AddTarget("Exceptioneer", exTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Error, exTarget));

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html>
@using Helpers;
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
@ -61,7 +61,7 @@
<span id="msgText">background notification</span>
</div>
@(Html.Telerik().ScriptRegistrar().jQuery(false))
<script type="text/javascript" src="/Scripts/Notification.js"></script>
<script type="text/javascript" src="/Scripts/Notification.js" async="async"></script>
@RenderSection("Scripts", required: false)
</body>
</html>

@ -71,8 +71,6 @@ namespace NzbDrone
IISProcess.BeginErrorReadLine();
IISProcess.BeginOutputReadLine();
IISProcess.PriorityClass = ProcessPriorityClass.AboveNormal;
//Start Ping
_pingTimer = new Timer(300000) { AutoReset = true };
_pingTimer.Elapsed += (PingServer);

@ -12,21 +12,25 @@ namespace NzbDrone
private static void Main()
{
Logger.Info(Process.GetCurrentProcess().Id);
try
{
Config.ConfigureNlog();
Logger.Info("Starting NZBDrone. Start-up Path:'{0}'", Config.ProjectRoot);
Thread.CurrentThread.Name = "Host";
Process currentProcess = Process.GetCurrentProcess();
if (currentProcess.PriorityClass < ProcessPriorityClass.Normal)
{
Logger.Info("Promoting process priority from {0} to {1}", currentProcess.PriorityClass, ProcessPriorityClass.Normal);
currentProcess.PriorityClass = ProcessPriorityClass.Normal;
}
currentProcess.EnableRaisingEvents = true;
currentProcess.Exited += ProgramExited;
AppDomain.CurrentDomain.UnhandledException += ((s, e) => AppDomainException(e));
AppDomain.CurrentDomain.ProcessExit += ProgramExited;
AppDomain.CurrentDomain.DomainUnload += ProgramExited;
Process.GetCurrentProcess().EnableRaisingEvents = true;
Process.GetCurrentProcess().Exited += ProgramExited;
Config.ConfigureNlog();
Logger.Info("Starting NZBDrone. Start-up Path:'{0}'", Config.ProjectRoot);
IISController.StopServer();
IISController.StartServer();

Loading…
Cancel
Save