mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
24 lines
878 B
C#
24 lines
878 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace DisplayMagicianShared
|
|
{
|
|
public class SharedLogger
|
|
{
|
|
|
|
internal static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "DisplayMagician");
|
|
internal static string AppLogPath = Path.Combine(AppDataPath, $"Logs");
|
|
internal static string AppSettingsFile = Path.Combine(AppDataPath, $"Settings_1.0.json");
|
|
public static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
|
|
|
/// <summary>
|
|
/// Provides a way of passing the NLog Logger instance to the DisplayMagician.Shared library so we log to a single log file.
|
|
/// </summary>
|
|
/// <param name="parentLogger"></param>
|
|
public SharedLogger(NLog.Logger parentLogger)
|
|
{
|
|
SharedLogger.logger = parentLogger;
|
|
}
|
|
}
|
|
}
|