AmplifyLogger constructor
AmplifyLogger([
- String namespace = rootNamespace
Creates a top-level AmplifyLogger.
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.
Implementation
factory AmplifyLogger([String namespace = rootNamespace]) {
// Create a logger inside the Amplify hierarchy so that printing and log
// level behavior are consistent with public API.
//
// Use AWSLogger to create a logger which can have its own hierarchy.
if (!namespace.startsWith(rootNamespace)) {
namespace = '$rootNamespace.$namespace';
}
return (AWSLogger.activeLoggers[namespace] ??= AmplifyLogger._(namespace))
as AmplifyLogger;
}