-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from iglance/development
Version 2.0.3
- Loading branch information
Showing
13 changed files
with
90 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// Logger.swift | ||
// iGlance | ||
// | ||
// Created by Dominik on 29.03.20. | ||
// Copyright © 2020 D0miH. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import CocoaLumberjack | ||
|
||
class Logger { | ||
let fileLogger: DDFileLogger | ||
|
||
init() { | ||
// set the custom log formatter | ||
DDOSLogger.sharedInstance.logFormatter = CustomLogFormatter() | ||
// add the loggers to the loggin framework | ||
DDLog.add(DDOSLogger.sharedInstance) | ||
|
||
// register the logger | ||
// logs are saved under /Library/Logs/iGlance/ | ||
fileLogger = DDFileLogger() | ||
fileLogger.logFormatter = CustomLogFormatter() | ||
fileLogger.rollingFrequency = 60 * 60 * 24 // 24 hours | ||
fileLogger.logFileManager.maximumNumberOfLogFiles = 7 | ||
DDLog.add(fileLogger) | ||
|
||
// set the default log level to error | ||
dynamicLogLevel = .error | ||
|
||
if AppDelegate.userSettings.settings.advancedLogging { | ||
// log all messages | ||
dynamicLogLevel = .all | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters