static PacketProcessing()
{
CrashOnException = true;
#if NOLOG
string logLevel = "Warn";
#else
string logLevel = Properties.Settings.Default.LogLevel;
#endif
if (!string.IsNullOrEmpty(logLevel))
{
LogLevels level;
if (Enum.TryParse<LogLevels>(logLevel, out level))
{
#if NOLOG
#else
string logfile = Properties.Settings.Default.LogPath;
if (!string.IsNullOrEmpty(logfile))
{
Log.InitializeLogging(level, logfile, Properties.Settings.Default.AppendLog);
}
#endif
}
}
}
#region Events