AWSLogger
Deprecated
use AWSDDLog instead
Objective-C
@interface AWSLogger : NSObject
Swift
class AWSLogger : NSObject
AWSLogger
is an utility class that handles logging to the console. Changing log levels during development may make debugging easier. You can change the log level by importing AWSCore.h
and calling:
Swift
AWSLogger.defaultLogger().logLevel = .None
The following logging level options are available:
.None
.Error
.Warn
.Info
.Debug (This is the default.)
.Verbose
Objective-C
[AWSLogger defaultLogger].logLevel = AWSLogLevelNone;
The following logging level options are available:
AWSLogLevelNone
AWSLogLevelError
AWSLogLevelWarn
AWSLogLevelInfo
AWSLogLevelDebug (This is the default.)
AWSLogLevelVerbose
Note
We recommend setting the log level toNone
before publishing to the Apple App Store.
-
The log level setting. The default value is
Debug
. -
Returns the shared logger object.
Declaration
Objective-C
+ (instancetype)defaultLogger;
Swift
class func `default`() -> Self!
Return Value
The shared logger object.
-
Prints out the formatted logs to the console. You can use the following predefined shorthand methods instead:
AWSLogError(fmt, ...) AWSLogWarn(fmt, ...) AWSLogInfo(fmt, ...) AWSLogDebug(fmt, ...) AWSLogVerbose(fmt, ...)
Declaration
Objective-C
- (void)log:(AWSLogLevel)logLevel format:(NSString *)fmt, ...;
Parameters
logLevel
The level of this log.
fmt
The formatted string to log.