AmplifyLogger class
A logging utility providing the ability to emit log entries, configure the level at which entries are emitted, and register plugins which can handle log entries as they're emitted.
Constructors
- AmplifyLogger([String namespace = rootNamespace])
-
Creates a top-level AmplifyLogger.
factory
- AmplifyLogger.category(Category category)
-
Creates a AmplifyLogger for the Amplify
category
.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- logLevel ↔ LogLevel
-
The minimum LogLevel that will be emitted by the logger.
getter/setter pairinherited
- namespace → String
-
The namespace of this logger.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- runtimeTypeName → String
-
The string value of runtimeType, saving a runtime lookup and preventing
obfuscation during web compilation.
no setteroverride
Methods
-
close(
) → void -
Closes the resource and all connected objects.
inherited
-
createChild(
String name) → AmplifyLogger -
Creates an AWSLogger with
this
as the parent.override -
debug(
String message, [Object? error, StackTrace? stackTrace]) → void -
Logs a message with level LogLevel.debug.
inherited
-
error(
String message, [Object? error, StackTrace? stackTrace]) → void -
Logs a message with level LogLevel.error.
inherited
-
getPlugin<
Plugin extends AWSLoggerPlugin> () → Plugin? -
Returns a plugin of type
Plugin
registered to this logger hierarchy ornull
.inherited -
info(
String message, [Object? error, StackTrace? stackTrace]) → void -
Logs a message with level LogLevel.info.
inherited
-
log(
LogLevel level, String message, [Object? error, StackTrace? stackTrace]) → void -
Logs a
message
at the givenlevel
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerPlugin<
T extends AWSLoggerPlugin> (T plugin) → void -
Registers an AWSLoggerPlugin to handle logs emitted by this logger
instance.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unregisterAllPlugins(
) → void -
Unregisters all AWSLoggerPlugins on this logger instance.
inherited
-
unregisterPlugin(
AWSLoggerPlugin plugin) → void -
Unregisters
plugin
from this logger instance.inherited -
verbose(
String message, [Object? error, StackTrace? stackTrace]) → void -
Logs a message with level LogLevel.verbose.
inherited
-
warn(
String message, [Object? error, StackTrace? stackTrace]) → void -
Logs a message with level LogLevel.warn.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- rootNamespace → const String
- The root namespace for all AmplifyLogger instances.