
import 'package:logger/logger.dart';

class Log {
  static Logger _logger;

  static init({ Level level = Level.debug }) {
    _logger = Logger(level: level,
      printer: PrettyPrinter(
        methodCount: 0,         // number of method calls to be displayed
        errorMethodCount: 10,   // number of method calls if stacktrace is provided
        lineLength: 120,        // width of the output
        colors: false,          // Colorful log messages
        printEmojis: true,      // Print an emoji for each log message
        printTime: true         // Should each log print contain a timestamp
    ),);
  }

  static d(dynamic message) {
    _logger.d(message);
  }

  static i(dynamic message) {
    _logger.i(message);
  }

  static w(dynamic message) {
    _logger.w(message);
  }

  static e(dynamic message) {
    _logger.e(message);
  }
}