Made the logLevel event static
This commit is contained in:
@@ -1,324 +1,324 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using EonaCat.Json;
|
using EonaCat.Json;
|
||||||
using EonaCat.Logger.Extensions;
|
using EonaCat.Logger.Extensions;
|
||||||
using EonaCat.Logger.GrayLog;
|
using EonaCat.Logger.GrayLog;
|
||||||
using EonaCat.Logger.Splunk.Models;
|
using EonaCat.Logger.Splunk.Models;
|
||||||
using EonaCat.Logger.Syslog;
|
using EonaCat.Logger.Syslog;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
// This file is part of the EonaCat project(s) which is released under the Apache License.
|
// This file is part of the EonaCat project(s) which is released under the Apache License.
|
||||||
// See the LICENSE file or go to https://EonaCat.com/License for full license details.
|
// See the LICENSE file or go to https://EonaCat.com/License for full license details.
|
||||||
|
|
||||||
namespace EonaCat.Logger.Managers;
|
namespace EonaCat.Logger.Managers;
|
||||||
|
|
||||||
public class ErrorMessage
|
public class ErrorMessage
|
||||||
{
|
{
|
||||||
public Exception Exception { get; set; }
|
public Exception Exception { get; set; }
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static class LogHelper
|
internal static class LogHelper
|
||||||
{
|
{
|
||||||
internal static event EventHandler<ErrorMessage> OnException;
|
internal static event EventHandler<ErrorMessage> OnException;
|
||||||
|
|
||||||
internal static event EventHandler<ErrorMessage> OnLogLevelDisabled;
|
internal static event EventHandler<ErrorMessage> OnLogLevelDisabled;
|
||||||
|
|
||||||
internal static string FormatMessageWithHeader(LoggerSettings settings, ELogType logType, string currentMessage,
|
internal static string FormatMessageWithHeader(LoggerSettings settings, ELogType logType, string currentMessage,
|
||||||
DateTime dateTime, string category = null)
|
DateTime dateTime, string category = null)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(currentMessage))
|
if (string.IsNullOrWhiteSpace(currentMessage))
|
||||||
{
|
{
|
||||||
return currentMessage;
|
return currentMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(category))
|
if (string.IsNullOrWhiteSpace(category))
|
||||||
{
|
{
|
||||||
category = "General";
|
category = "General";
|
||||||
}
|
}
|
||||||
|
|
||||||
var sb = new StringBuilder(settings?.HeaderFormat ?? "[EonaCatLogger]");
|
var sb = new StringBuilder(settings?.HeaderFormat ?? "[EonaCatLogger]");
|
||||||
|
|
||||||
sb.Replace("{ts}",
|
sb.Replace("{ts}",
|
||||||
dateTime.ToString(settings?.TimestampFormat ?? "yyyy-MM-dd HH:mm:ss") + " " +
|
dateTime.ToString(settings?.TimestampFormat ?? "yyyy-MM-dd HH:mm:ss") + " " +
|
||||||
(settings?.UseLocalTime ?? false ? "[LOCAL]" : "[UTC]"))
|
(settings?.UseLocalTime ?? false ? "[LOCAL]" : "[UTC]"))
|
||||||
.Replace("{host}", $"[Host:{Dns.GetHostName()}]")
|
.Replace("{host}", $"[Host:{Dns.GetHostName()}]")
|
||||||
.Replace("{category}", $"[Category:{category}]")
|
.Replace("{category}", $"[Category:{category}]")
|
||||||
.Replace("{thread}", $"[ThreadId:{Environment.CurrentManagedThreadId}]")
|
.Replace("{thread}", $"[ThreadId:{Environment.CurrentManagedThreadId}]")
|
||||||
.Replace("{sev}", $"[{logType}]");
|
.Replace("{sev}", $"[{logType}]");
|
||||||
|
|
||||||
if (!settings?.RemoveMessagePrefix ?? (false && !currentMessage.Contains("[EonaCatLogger]")))
|
if (!settings?.RemoveMessagePrefix ?? (false && !currentMessage.Contains("[EonaCatLogger]")))
|
||||||
{
|
{
|
||||||
sb.Insert(0, "[EonaCatLogger] ");
|
sb.Insert(0, "[EonaCatLogger] ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.Append(" ").Append(currentMessage);
|
sb.Append(" ").Append(currentMessage);
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
|
||||||
|
|
||||||
internal static void SendToConsole(LoggerSettings settings, ELogType logType, string message, bool writeToConsole)
|
|
||||||
{
|
|
||||||
if (settings == null || !writeToConsole || string.IsNullOrWhiteSpace(message))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.EnableColors && settings.Colors != null)
|
|
||||||
{
|
|
||||||
var prevForeground = Console.ForegroundColor;
|
|
||||||
var prevBackground = Console.BackgroundColor;
|
|
||||||
|
|
||||||
ConsoleColor foregroundColor;
|
|
||||||
ConsoleColor backgroundColor;
|
|
||||||
switch (logType)
|
|
||||||
{
|
|
||||||
case ELogType.DEBUG:
|
|
||||||
foregroundColor = settings.Colors.Debug.Foreground;
|
|
||||||
backgroundColor = settings.Colors.Debug.Background;
|
|
||||||
break;
|
|
||||||
case ELogType.INFO:
|
|
||||||
foregroundColor = settings.Colors.Info.Foreground;
|
|
||||||
backgroundColor = settings.Colors.Info.Background;
|
|
||||||
break;
|
|
||||||
case ELogType.WARNING:
|
|
||||||
foregroundColor = settings.Colors.Warning.Foreground;
|
|
||||||
backgroundColor = settings.Colors.Warning.Background;
|
|
||||||
break;
|
|
||||||
case ELogType.ERROR:
|
|
||||||
foregroundColor = settings.Colors.Error.Foreground;
|
|
||||||
backgroundColor = settings.Colors.Error.Background;
|
|
||||||
break;
|
|
||||||
case ELogType.TRAFFIC:
|
|
||||||
foregroundColor = settings.Colors.Traffic.Foreground;
|
|
||||||
backgroundColor = settings.Colors.Traffic.Background;
|
|
||||||
break;
|
|
||||||
case ELogType.CRITICAL:
|
|
||||||
foregroundColor = settings.Colors.Critical.Foreground;
|
|
||||||
backgroundColor = settings.Colors.Critical.Background;
|
|
||||||
break;
|
|
||||||
case ELogType.TRACE:
|
|
||||||
foregroundColor = settings.Colors.Trace.Foreground;
|
|
||||||
backgroundColor = settings.Colors.Trace.Background;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Console.ForegroundColor = foregroundColor;
|
|
||||||
Console.BackgroundColor = backgroundColor;
|
|
||||||
Console.WriteLine(message);
|
|
||||||
Console.ForegroundColor = prevForeground;
|
|
||||||
Console.BackgroundColor = prevBackground;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.WriteLine(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void SendToFile(ILogger logger, LoggerSettings settings, ELogType logType, string message)
|
|
||||||
{
|
|
||||||
if (logger == null || settings == null || !settings.EnableFileLogging ||
|
|
||||||
string.IsNullOrWhiteSpace(message))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var logLevel = logType.ToLogLevel();
|
|
||||||
if (IsLogLevelEnabled(settings, logType))
|
|
||||||
{
|
|
||||||
Log(logger, logLevel, message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsLogLevelEnabled(LoggerSettings loggerSettings, ELogType logType)
|
internal static void SendToConsole(LoggerSettings settings, ELogType logType, string message, bool writeToConsole)
|
||||||
|
{
|
||||||
|
if (settings == null || !writeToConsole || string.IsNullOrWhiteSpace(message))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings.EnableColors && settings.Colors != null)
|
||||||
|
{
|
||||||
|
var prevForeground = Console.ForegroundColor;
|
||||||
|
var prevBackground = Console.BackgroundColor;
|
||||||
|
|
||||||
|
ConsoleColor foregroundColor;
|
||||||
|
ConsoleColor backgroundColor;
|
||||||
|
switch (logType)
|
||||||
|
{
|
||||||
|
case ELogType.DEBUG:
|
||||||
|
foregroundColor = settings.Colors.Debug.Foreground;
|
||||||
|
backgroundColor = settings.Colors.Debug.Background;
|
||||||
|
break;
|
||||||
|
case ELogType.INFO:
|
||||||
|
foregroundColor = settings.Colors.Info.Foreground;
|
||||||
|
backgroundColor = settings.Colors.Info.Background;
|
||||||
|
break;
|
||||||
|
case ELogType.WARNING:
|
||||||
|
foregroundColor = settings.Colors.Warning.Foreground;
|
||||||
|
backgroundColor = settings.Colors.Warning.Background;
|
||||||
|
break;
|
||||||
|
case ELogType.ERROR:
|
||||||
|
foregroundColor = settings.Colors.Error.Foreground;
|
||||||
|
backgroundColor = settings.Colors.Error.Background;
|
||||||
|
break;
|
||||||
|
case ELogType.TRAFFIC:
|
||||||
|
foregroundColor = settings.Colors.Traffic.Foreground;
|
||||||
|
backgroundColor = settings.Colors.Traffic.Background;
|
||||||
|
break;
|
||||||
|
case ELogType.CRITICAL:
|
||||||
|
foregroundColor = settings.Colors.Critical.Foreground;
|
||||||
|
backgroundColor = settings.Colors.Critical.Background;
|
||||||
|
break;
|
||||||
|
case ELogType.TRACE:
|
||||||
|
foregroundColor = settings.Colors.Trace.Foreground;
|
||||||
|
backgroundColor = settings.Colors.Trace.Background;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.ForegroundColor = foregroundColor;
|
||||||
|
Console.BackgroundColor = backgroundColor;
|
||||||
|
Console.WriteLine(message);
|
||||||
|
Console.ForegroundColor = prevForeground;
|
||||||
|
Console.BackgroundColor = prevBackground;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void SendToFile(ILogger logger, LoggerSettings settings, ELogType logType, string message)
|
||||||
|
{
|
||||||
|
if (logger == null || settings == null || !settings.EnableFileLogging ||
|
||||||
|
string.IsNullOrWhiteSpace(message))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var logLevel = logType.ToLogLevel();
|
||||||
|
if (IsLogLevelEnabled(settings, logType))
|
||||||
|
{
|
||||||
|
Log(logger, logLevel, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool IsLogLevelEnabled(LoggerSettings loggerSettings, ELogType logType)
|
||||||
{
|
{
|
||||||
if (loggerSettings == null)
|
if (loggerSettings == null)
|
||||||
{
|
{
|
||||||
OnLogLevelDisabled?.Invoke(this, new ErrorMessage { Message = "Settings is null." });
|
OnLogLevelDisabled?.Invoke(null, new ErrorMessage { Message = "Settings is null." });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isEnabled = loggerSettings.MaxLogType != ELogType.NONE && logType <= loggerSettings.MaxLogType;
|
var isEnabled = loggerSettings.MaxLogType != ELogType.NONE && logType <= loggerSettings.MaxLogType;
|
||||||
if (!isEnabled)
|
if (!isEnabled)
|
||||||
{
|
{
|
||||||
OnLogLevelDisabled?.Invoke(this, new ErrorMessage { Message = $"Logtype '{logType}' is not enabled, cannot log message" });
|
OnLogLevelDisabled?.Invoke(null, new ErrorMessage { Message = $"Logtype '{logType}' is not enabled, cannot log message" });
|
||||||
}
|
}
|
||||||
return isEnabled;
|
return isEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetLogLevel(LoggerSettings settings, ELogType logType)
|
public static void SetLogLevel(LoggerSettings settings, ELogType logType)
|
||||||
{
|
{
|
||||||
settings.MaxLogType = logType;
|
settings.MaxLogType = logType;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Log(ILogger logger, LogLevel logLevel, string message)
|
private static void Log(ILogger logger, LogLevel logLevel, string message)
|
||||||
{
|
{
|
||||||
logger.Log(logLevel, message);
|
logger.Log(logLevel, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task SendToSplunkServersAsync(LoggerSettings settings, SplunkPayload splunkPayload,
|
public static async Task SendToSplunkServersAsync(LoggerSettings settings, SplunkPayload splunkPayload,
|
||||||
bool sendToSplunkServer)
|
bool sendToSplunkServer)
|
||||||
{
|
{
|
||||||
if (settings == null || !sendToSplunkServer || splunkPayload == null)
|
if (settings == null || !sendToSplunkServer || splunkPayload == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.SplunkServers == null)
|
if (settings.SplunkServers == null)
|
||||||
{
|
{
|
||||||
settings.SplunkServers = new List<SplunkServer.SplunkServer>();
|
settings.SplunkServers = new List<SplunkServer.SplunkServer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var splunkServer in settings.SplunkServers)
|
foreach (var splunkServer in settings.SplunkServers)
|
||||||
{
|
{
|
||||||
if (!splunkServer.HasHecUrl || !splunkServer.HasHecToken)
|
if (!splunkServer.HasHecUrl || !splunkServer.HasHecToken)
|
||||||
{
|
{
|
||||||
OnException?.Invoke(null,
|
OnException?.Invoke(null,
|
||||||
new ErrorMessage
|
new ErrorMessage
|
||||||
{
|
{
|
||||||
Message =
|
Message =
|
||||||
$"Splunk server HecUrl or HecToken not specified, skipping splunkServer '{splunkServer.SplunkHecUrl}'"
|
$"Splunk server HecUrl or HecToken not specified, skipping splunkServer '{splunkServer.SplunkHecUrl}'"
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var response = await splunkServer.SendAsync(splunkPayload);
|
var response = await splunkServer.SendAsync(splunkPayload);
|
||||||
|
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
OnException?.Invoke(null,
|
OnException?.Invoke(null,
|
||||||
new ErrorMessage
|
new ErrorMessage
|
||||||
{
|
{
|
||||||
Message =
|
Message =
|
||||||
$"Failed to send log to Splunk '{splunkServer.SplunkHecUrl}'. Status code: {response.StatusCode}"
|
$"Failed to send log to Splunk '{splunkServer.SplunkHecUrl}'. Status code: {response.StatusCode}"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
OnException?.Invoke(null,
|
OnException?.Invoke(null,
|
||||||
new ErrorMessage
|
new ErrorMessage
|
||||||
{
|
{
|
||||||
Exception = exception,
|
Exception = exception,
|
||||||
Message =
|
Message =
|
||||||
$"Error while logging to Splunk Server '{splunkServer.SplunkHecUrl}': {exception.Message}"
|
$"Error while logging to Splunk Server '{splunkServer.SplunkHecUrl}': {exception.Message}"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task SendToSplunkServersAsync(LoggerSettings settings, string logType, string message,
|
public static async Task SendToSplunkServersAsync(LoggerSettings settings, string logType, string message,
|
||||||
bool sendToSplunkServer)
|
bool sendToSplunkServer)
|
||||||
{
|
{
|
||||||
if (settings == null || !sendToSplunkServer || string.IsNullOrWhiteSpace(message))
|
if (settings == null || !sendToSplunkServer || string.IsNullOrWhiteSpace(message))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var splunkPayload = new SplunkPayload
|
var splunkPayload = new SplunkPayload
|
||||||
{
|
{
|
||||||
Host = Environment.MachineName,
|
Host = Environment.MachineName,
|
||||||
EventData = message,
|
EventData = message,
|
||||||
SourceType = logType
|
SourceType = logType
|
||||||
};
|
};
|
||||||
|
|
||||||
await SendToSplunkServersAsync(settings, splunkPayload, sendToSplunkServer);
|
await SendToSplunkServersAsync(settings, splunkPayload, sendToSplunkServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static async Task SendToGrayLogServersAsync(LoggerSettings settings, string message, ELogType logLevel,
|
internal static async Task SendToGrayLogServersAsync(LoggerSettings settings, string message, ELogType logLevel,
|
||||||
string facility, string source, bool sendToGrayLogServer, string version = "1.1")
|
string facility, string source, bool sendToGrayLogServer, string version = "1.1")
|
||||||
{
|
{
|
||||||
if (settings == null || !sendToGrayLogServer || string.IsNullOrWhiteSpace(message))
|
if (settings == null || !sendToGrayLogServer || string.IsNullOrWhiteSpace(message))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var grayLogServer in settings.GrayLogServers ?? new List<GrayLogServer> { new("127.0.0.1") })
|
foreach (var grayLogServer in settings.GrayLogServers ?? new List<GrayLogServer> { new("127.0.0.1") })
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var gelfMessage = new
|
var gelfMessage = new
|
||||||
{
|
{
|
||||||
version,
|
version,
|
||||||
host = Environment.MachineName,
|
host = Environment.MachineName,
|
||||||
short_message = message,
|
short_message = message,
|
||||||
level = logLevel.ToGrayLogLevel(),
|
level = logLevel.ToGrayLogLevel(),
|
||||||
facility,
|
facility,
|
||||||
source,
|
source,
|
||||||
timestamp = DateTime.UtcNow.ToUnixTimestamp()
|
timestamp = DateTime.UtcNow.ToUnixTimestamp()
|
||||||
};
|
};
|
||||||
|
|
||||||
var messageBytes = Encoding.UTF8.GetBytes(JsonHelper.ToJson(gelfMessage));
|
var messageBytes = Encoding.UTF8.GetBytes(JsonHelper.ToJson(gelfMessage));
|
||||||
await grayLogServer.Udp.SendAsync(messageBytes, messageBytes.Length);
|
await grayLogServer.Udp.SendAsync(messageBytes, messageBytes.Length);
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
OnException?.Invoke(null,
|
OnException?.Invoke(null,
|
||||||
new ErrorMessage
|
new ErrorMessage
|
||||||
{
|
{
|
||||||
Exception = exception,
|
Exception = exception,
|
||||||
Message =
|
Message =
|
||||||
$"Error while logging to GrayLog Server '{grayLogServer.Hostname}': {exception.Message}"
|
$"Error while logging to GrayLog Server '{grayLogServer.Hostname}': {exception.Message}"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static async Task SendToSysLogServersAsync(LoggerSettings settings, string message,
|
internal static async Task SendToSysLogServersAsync(LoggerSettings settings, string message,
|
||||||
bool sendToSyslogServers)
|
bool sendToSyslogServers)
|
||||||
{
|
{
|
||||||
if (settings == null || !sendToSyslogServers || string.IsNullOrWhiteSpace(message))
|
if (settings == null || !sendToSyslogServers || string.IsNullOrWhiteSpace(message))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var server in settings.SysLogServers ?? new List<SyslogServer> { new("127.0.0.1") })
|
foreach (var server in settings.SysLogServers ?? new List<SyslogServer> { new("127.0.0.1") })
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(server.Hostname))
|
if (string.IsNullOrWhiteSpace(server.Hostname))
|
||||||
{
|
{
|
||||||
OnException?.Invoke(null,
|
OnException?.Invoke(null,
|
||||||
new ErrorMessage { Message = "Server hostname not specified, skipping SysLog Server" });
|
new ErrorMessage { Message = "Server hostname not specified, skipping SysLog Server" });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server.Port < 0)
|
if (server.Port < 0)
|
||||||
{
|
{
|
||||||
OnException?.Invoke(null,
|
OnException?.Invoke(null,
|
||||||
new ErrorMessage { Message = "Server port must be zero or greater, skipping SysLog Server" });
|
new ErrorMessage { Message = "Server port must be zero or greater, skipping SysLog Server" });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = Encoding.UTF8.GetBytes(message);
|
var data = Encoding.UTF8.GetBytes(message);
|
||||||
await server.Udp.SendAsync(data, data.Length);
|
await server.Udp.SendAsync(data, data.Length);
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
OnException?.Invoke(null,
|
OnException?.Invoke(null,
|
||||||
new ErrorMessage
|
new ErrorMessage
|
||||||
{
|
{
|
||||||
Exception = exception,
|
Exception = exception,
|
||||||
Message = $"Error while logging to SysLog Server '{server.Hostname}': {exception.Message}"
|
Message = $"Error while logging to SysLog Server '{server.Hostname}': {exception.Message}"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string GetStartupMessage()
|
internal static string GetStartupMessage()
|
||||||
{
|
{
|
||||||
return $"{DllInfo.ApplicationName} started.";
|
return $"{DllInfo.ApplicationName} started.";
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string GetStopMessage()
|
internal static string GetStopMessage()
|
||||||
{
|
{
|
||||||
return $"{DllInfo.ApplicationName} stopped.";
|
return $"{DllInfo.ApplicationName} stopped.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user