AWSDDLogFileManagerDefault
Objective-C
@interface AWSDDLogFileManagerDefault : NSObject <AWSDDLogFileManager>
Swift
class AWSDDLogFileManagerDefault : NSObject, AWSDDLogFileManager
Default log file manager.
All log files are placed inside the logsDirectory.
If a specific logsDirectory isn’t specified, the default directory is used.
On Mac, this is in ~/Library/Logs/<Application Name>
.
On iPhone, this is in ~/Library/Caches/Logs
.
Log files are named "<bundle identifier> <date> <time>.log"
Example: com.organization.myapp 2013-12-03 17-14.log
Archived log files are automatically deleted according to the maximumNumberOfLogFiles
property.
-
Default initializer
Declaration
Objective-C
- (instancetype)init;
Swift
convenience init!()
-
Designated initialized, requires the logs directory
Declaration
Objective-C
- (instancetype)initWithLogsDirectory:(NSString *)logsDirectory;
Swift
init!(logsDirectory: String!)
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithLogsDirectory:(NSString *)logsDirectory defaultFileProtectionLevel:(NSString *)fileProtectionLevel;
Swift
convenience init!(logsDirectory: String!, defaultFileProtectionLevel fileProtectionLevel: String!)
-
Generates log file name with default format
"<bundle identifier> <date> <time>.log"
Example:MobileSafari 2013-12-03 17-14.log
You can change it by overriding
newLogFileName
andisLogFile:
methods.Declaration
Objective-C
@property (copy, readonly) NSString *newLogFileName;
Swift
var newLogFileName: String! { get }
-
Default log file name is
"<bundle identifier> <date> <time>.log"
. Example:MobileSafari 2013-12-03 17-14.log
You can change it by overriding
newLogFileName
andisLogFile:
methods.Declaration
Objective-C
- (BOOL)isLogFile:(NSString *)fileName;
Swift
func isLogFile(withName fileName: String!) -> Bool