trace method

  1. @override
dynamic trace(
  1. dynamic message, {
  2. String? prefix,
  3. dynamic error,
  4. StackTrace? stackTrace,
  5. int? maxChars,
  6. bool isJson = false,
  7. int? fileLinkLevel,
})
override

method trace

Implementation

@override
trace(dynamic message,
    {String? prefix,
    dynamic error,
    StackTrace? stackTrace,
    int? maxChars,
    bool isJson = false,
    int? fileLinkLevel}) {
  try {
    final formattedMessage = _formatMessage(
        isJson ? jsonFormat(message) : message,
        prefix ?? _prefix,
        maxChars,
        isJson);

    intercept('$formattedMessage\n${stackTrace ?? StackTrace.current}',
        LogType.trace);

    _logger.log(formattedMessage,
        tag: 'TRACE',
        stackTrace: stackTrace ?? StackTrace.current,
        level: _Level.trace,
        fileLinkLevel: fileLinkLevel);
  } catch (_) {}
}