Skip to content

Commit 1c38f94

Browse files
committed
Addresses #49
"Processing" type messages are sent as info instead of debug.
1 parent 27f9f16 commit 1c38f94

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Outset/Outset.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct Outset: ParsableCommand {
161161
// perform log file rotation
162162
performLogRotation(logFolderPath: logDirectory, logFileBaseName: logFileName, maxLogFiles: logFileMaxCount)
163163

164-
writeLog("Processing scheduled runs for boot", logLevel: .debug)
164+
writeLog("Processing scheduled runs for boot", logLevel: .info)
165165
ensureWorkingFolders()
166166

167167
writeOutsetPreferences(prefs: prefs)
@@ -190,15 +190,15 @@ struct Outset: ParsableCommand {
190190
}
191191

192192
if loginWindow {
193-
writeLog("Processing scheduled runs for login window", logLevel: .debug)
193+
writeLog("Processing scheduled runs for login window", logLevel: .info)
194194

195195
if !folderContents(path: loginWindowDir).isEmpty {
196196
processItems(loginWindowDir)
197197
}
198198
}
199199

200200
if login {
201-
writeLog("Processing scheduled runs for login", logLevel: .debug)
201+
writeLog("Processing scheduled runs for login", logLevel: .info)
202202
if !prefs.ignoredUsers.contains(consoleUser) {
203203
if !folderContents(path: loginOnceDir).isEmpty {
204204
processItems(loginOnceDir, once: true, override: prefs.overrideLoginOnce)
@@ -214,7 +214,7 @@ struct Outset: ParsableCommand {
214214
}
215215

216216
if loginPrivileged {
217-
writeLog("Processing scheduled runs for privileged login", logLevel: .debug)
217+
writeLog("Processing scheduled runs for privileged login", logLevel: .info)
218218
if checkFileExists(path: loginPrivilegedTrigger) {
219219
pathCleanup(pathname: loginPrivilegedTrigger)
220220
}
@@ -231,7 +231,7 @@ struct Outset: ParsableCommand {
231231
}
232232

233233
if onDemand {
234-
writeLog("Processing on-demand", logLevel: .debug)
234+
writeLog("Processing on-demand", logLevel: .info)
235235
if !folderContents(path: onDemandDir).isEmpty {
236236
if !["root", "loginwindow"].contains(consoleUser) {
237237
let currentUser = NSUserName()
@@ -248,7 +248,7 @@ struct Outset: ParsableCommand {
248248
}
249249

250250
if loginEvery {
251-
writeLog("Processing scripts in login-every", logLevel: .debug)
251+
writeLog("Processing scripts in login-every", logLevel: .info)
252252
if !prefs.ignoredUsers.contains(consoleUser) {
253253
if !folderContents(path: loginEveryDir).isEmpty {
254254
processItems(loginEveryDir)
@@ -257,7 +257,7 @@ struct Outset: ParsableCommand {
257257
}
258258

259259
if loginOnce {
260-
writeLog("Processing scripts in login-once", logLevel: .debug)
260+
writeLog("Processing scripts in login-once", logLevel: .info)
261261
if !prefs.ignoredUsers.contains(consoleUser) {
262262
if !folderContents(path: loginOnceDir).isEmpty {
263263
processItems(loginOnceDir, once: true, override: prefs.overrideLoginOnce)
@@ -268,7 +268,7 @@ struct Outset: ParsableCommand {
268268
}
269269

270270
if cleanup {
271-
writeLog("Cleaning up on-demand directory.", logLevel: .debug)
271+
writeLog("Cleaning up on-demand directory.", logLevel: .info)
272272
if checkFileExists(path: onDemandTrigger) { pathCleanup(pathname: onDemandTrigger) }
273273
if checkFileExists(path: cleanupTrigger) { pathCleanup(pathname: cleanupTrigger) }
274274
if !folderContents(path: onDemandDir).isEmpty { pathCleanup(pathname: onDemandDir) }

Outset/Utils/ItemProcessing.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func processItems(_ path: String, deleteItems: Bool=false, once: Bool=false, ove
8585
}
8686

8787
if once {
88-
writeLog("Processing run-once \(script)", logLevel: .debug)
88+
writeLog("Processing run-once \(script)", logLevel: .info)
8989
// If this is supposed to be a runonce item then we want to check to see if has an existing runonce entry
9090
// looks for a key with the full script path. Writes the full path and run date when done
9191
if !runOnceDict.contains(where: {$0.key == script}) {
@@ -119,7 +119,7 @@ func processItems(_ path: String, deleteItems: Bool=false, once: Bool=false, ove
119119
}
120120
}
121121
} else {
122-
writeLog("Processing script \(script)", logLevel: .debug)
122+
writeLog("Processing script \(script)", logLevel: .info)
123123
let (_, error, status) = runShellCommand(script, args: [consoleUser], verbose: true)
124124
if status != 0 {
125125
writeLog(error, logLevel: .error)

0 commit comments

Comments
 (0)