talker_logger 0.9.0 copy "talker_logger: ^0.9.0" to clipboard
talker_logger: ^0.9.0 copied to clipboard

outdated

Logger core package for talker (advanced error handler and logger package)

talker_logger #

Talker - Advanced exception handling and logging for dart/flutter applications 🚀 #

Core talker package
The package is designed to to make simple and extended logs
Can be used separately from the main parent package
In order to use all the functionality - go to the main page

Get Started #

Follow these steps to use this package

Add dependency #

dependencies:
  talker_logger: ^0.7.0

Easy to use #

Create TalkerLogger instance and call prepared methods

// Create instance
final logger = TalkerLogger();
// Log messages
logger.debug('debug');
logger.info('info');
logger.critical('critical');
logger.error('error');
logger.fine('fine');
logger.good('good');
logger.warning('warning');
logger.verbose('verbose');
logger.log('info', level: LogLevel.info);
logger.log('custom pen log', pen: AnsiPen()..xterm(49));

Result

More examples you can get there or in docs

Customization #

This logger has simple settings that can change output

1. Filtering #

  final logger = TalkerLogger(
    settings: const TalkerLoggerSettings(
      // Set current logging level
      level: LogLevel.critical,
    ),
  );

  // Works as before
  logger.critical('critical');
  // Does not work
  logger.info('info');

Result

2. Formating #

  final logger = TalkerLogger(
    settings: TalkerLoggerSettings(
      colors: {
        LogLevel.critical: AnsiPen()..yellow(),
        LogLevel.error: AnsiPen()..yellow(),
        LogLevel.info: AnsiPen()..yellow(),
        LogLevel.fine: AnsiPen()..yellow(),
      },
      maxLineWidth: 20,
      lineSymbol: '#',
      enableColors: true,
    ),
  );

  logger.info('info');
  logger.critical('critical');
  logger.error('error');
  logger.fine('fine');

Result

More examples you can get there or in docs

46
likes
0
pub points
90%
popularity

Publisher

verified publisherfrezycode.com

Logger core package for talker (advanced error handler and logger package)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ansicolor

More

Packages that depend on talker_logger