using NLog.Targets; namespace Mirle.Component.Record { /// /// 記錄檔格式類別 /// public static class FileLayout { /// /// 微服物平台主程式記錄檔格式 /// public static readonly FileTarget MicroServicePlatformFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/MicroServicePlatform.log", ArchiveFileName = "${basedir}/archives/${shortdate}/MicroServicePlatform.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; /// /// 倉儲執行系統主程式記錄檔格式 /// public static readonly FileTarget WarehouseExecutionSystemFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/WarehouseExecutionSystem.log", ArchiveFileName = "${basedir}/archives/${shortdate}/WarehouseExecutionSystem.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; /// /// 倉儲控制系統主程式記錄檔格式 /// public static readonly FileTarget WarehouseControlSystemFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/WarehouseControlSystem.log", ArchiveFileName = "${basedir}/archives/${shortdate}/WarehouseControlSystem.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; /// /// 控制器控制系統主程式記錄檔格式 /// public static readonly FileTarget PLCControlerSystemFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/PLCControlerSystem.log", ArchiveFileName = "${basedir}/archives/${shortdate}/PLCControlerSystem.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; /// /// 資料交換平台主程式記錄檔格式 /// public static readonly FileTarget DataExchangePlatformFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/DataExchangePlatform.log", ArchiveFileName = "${basedir}/archives/${shortdate}/DataExchangePlatform.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; /// /// 資料交換平台主程式記錄檔格式 /// public static readonly FileTarget WCSProcessFlowFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/Flow.log", ArchiveFileName = "${basedir}/archives/${shortdate}/Flow.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; /// /// 錯誤資料紀錄檔格式 /// public static readonly FileTarget ErrorDataFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/ErrorData.log", ArchiveFileName = "${basedir}/archives/${shortdate}/ErrorData.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; /// /// 戰情室紀錄檔格式 /// public static readonly FileTarget WarRoomFileLayout = new FileTarget() { Layout = "[${longdate}] | [${logger}] | [${level:uppercase=true}] | ${message}${exception:format=tostring}", FileName = "${basedir}/Logs/${shortdate}/WarRoom.log", ArchiveFileName = "${basedir}/archives/${shortdate}/WarRoom.zip", ArchiveNumbering = ArchiveNumberingMode.Date, ArchiveDateFormat = "yyyy-MM-dd", ArchiveEvery = FileArchivePeriod.Day, EnableArchiveFileCompression = true, KeepFileOpen = true, MaxArchiveFiles = 7 }; } }