mirror of
https://github.com/munki/munki.git
synced 2026-05-05 20:09:19 -05:00
Add timestamp back to MSC logging entries
This commit is contained in:
@@ -88,7 +88,8 @@ func setup_logging() {
|
||||
func msc_log(_ source: String, _ event: String, msg: String = "") {
|
||||
// Log an event from a source.
|
||||
if MSULOGFILE != "" {
|
||||
let logString = "\(source): \(event) \(msg)\n"
|
||||
let datestamp = NSDate().timeIntervalSince1970
|
||||
let logString = "\(datestamp) \(source): \(event) \(msg)\n"
|
||||
if let logData = logString.data(using: String.Encoding.utf8) {
|
||||
if let fh = FileHandle(forUpdatingAtPath: MSULOGFILE) {
|
||||
let _ = fh.seekToEndOfFile()
|
||||
|
||||
Reference in New Issue
Block a user