JsonFormatter constructor

JsonFormatter({
  1. LevelFormatter<Object> formatLevel = _formatLevel,
  2. TimestampFormatter<Object> formatTimestamp = _formatTimestamp,
})

Creates a new JsonFormatter.

Optional formatLevel and formatTimestamp callbacks may be provided and are used to format severity levels and timestamp.

Implementation

// ignore: sort_unnamed_constructors_first
factory JsonFormatter(
    {LevelFormatter<Object> formatLevel = _formatLevel,
    TimestampFormatter<Object> formatTimestamp = _formatTimestamp}) {
  final formatter = JsonFormatter._(formatLevel, formatTimestamp);

  return formatter;
}