import 'package:logger/logger.dart';


const level = Level.debug;

final _logger = Logger(
    printer: PrettyPrinter(
        stackTraceBeginIndex: 1,
        methodCount: 2
    ),
    level: level
);
final _loggerNoStack = Logger(
  printer: PrettyPrinter(
      methodCount: 0,
    printTime: true
  ),
    level: level
);


void debug(dynamic message, [dynamic error, StackTrace? stackTrace]){
  _logger.d(message, error:error, stackTrace:stackTrace);
}

void info(dynamic message, [dynamic error, StackTrace? stackTrace]){
  _loggerNoStack.i(message, error:error, stackTrace:stackTrace);
}

void warn(dynamic message, [dynamic error, StackTrace? stackTrace]){
  _logger.w(message, error:error, stackTrace:stackTrace);
}

void error(dynamic message, [dynamic error, StackTrace? stackTrace]){
  _logger.e(message, error:error, stackTrace:stackTrace);
}