MyAppLogger class abstract

MyAppLogger provides a convenient way to create a Logger instance for any class. It uses a custom log printer to format logs with the class name.

Example usage:

import 'package:your_project/common/utils/utils.dart';

class MyService {
  final log = MyAppLogger.getLogger('MyService');

  void doSomething() {
    log.d('Debug message');
    log.i('Info message');
    log.e('Error message');
  }
}

The logger will prefix log messages with the class name and use the debug level by default.

Constructors

MyAppLogger()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getLogger(String className, {Level? level}) → Logger
Returns a Logger instance for the given class name.