Fix for unified logging subsystem naming

This commit is contained in:
Greg Neagle
2025-10-09 20:22:48 -07:00
parent 7ede11a43d
commit 64da9216da

View File

@@ -56,7 +56,9 @@ func munkiLog(_ message: String, logFile: String = "") {
logPath = logNamed(MAIN_LOG_NAME)
} else {
logPath = logNamed(logFile)
subsystem = "com.googlecode.munki.\((logFile as NSString).deletingPathExtension)"
if logFile != MAIN_LOG_NAME {
subsystem = "com.googlecode.munki.\((logFile as NSString).deletingPathExtension)"
}
}
if let logData = logString.data(using: String.Encoding.utf8) {
if !FileManager.default.fileExists(atPath: logPath) {