Logs constructor

Logs({
  1. LogLevel storeLogLevel = LogLevel.verbose,
  2. LogLevel printLogLevelWhenDebug = LogLevel.verbose,
  3. LogLevel printLogLevelWhenRelease = LogLevel.error,
  4. int storeLimit = 500,
  5. bool inReleaseMode = false,
})

Implementation

Logs({
  /// The minimum log level to store in memory for later retrieval
  LogLevel storeLogLevel = LogLevel.verbose,

  /// The minimum log level to print when running in debug mode
  LogLevel printLogLevelWhenDebug = LogLevel.verbose,

  /// The minimum log level to print when running in release mode. Use LogLevel.none to disable printing
  LogLevel printLogLevelWhenRelease = LogLevel.error,

  /// The maximum number of logs to store in memory. When the limit is reached, the oldest logs are removed
  int storeLimit = 500,

  /// Set to true to run in release mode. Use your own method to determine if the app is running in release mode
  /// In flutter, you simply pass kReleaseMode from the foundation package
  /// ```dart
  /// import 'package:flutter/foundation.dart';
  /// final log = Logs(isRelease: kReleaseMode);
  /// ```
  bool inReleaseMode = false,
})  : _printLogLevelWhenRelease = printLogLevelWhenRelease,
      _printLogLevelWhenDebug = printLogLevelWhenDebug,
      _storeLogLevel = storeLogLevel,
      _storeLimit = storeLimit,
      _isRelease = inReleaseMode;