Files
cherrypick/talker_cherrypick_logger/example/talker_cherrypick_logger_example.dart

18 lines
605 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:talker_cherrypick_logger/talker_cherrypick_logger.dart';
import 'package:talker/talker.dart';
void main() {
final talker = Talker();
final logger = TalkerCherryPickLogger(talker);
logger.info('Hello from CherryPickLogger!');
logger.warn('Something might be wrong...');
logger.error('Oops! An error occurred', Exception('Test error'));
// Вывод всех логов
print('\nВсе сообщения логирования через Talker:');
for (final log in talker.history) {
print(log); // Пример, либо log.toString(), либо log.message
}
}