Drop log filename path extension ('.log') when making a subsystem name for unified logging

This commit is contained in:
Greg Neagle
2025-01-20 17:09:14 -08:00
parent 91eaac9750
commit b222e62061
+1 -1
View File
@@ -54,7 +54,7 @@ func munkiLog(_ message: String, logFile: String = "") {
logPath = mainLogPath()
} else {
logPath = logNamed(logFile)
subsystem = "com.googlecode.munki.\(logFile)"
subsystem = "com.googlecode.munki.\((logFile as NSString).deletingPathExtension)"
}
if let logData = logString.data(using: String.Encoding.utf8) {
if !pathExists(logPath) {