[READ ONLY MIRROR] Open Source TikTok alternative built on AT Protocol github.com/sprksocial/client
flutter atproto video dart
Something went wrong. Try again.
README.md
Spark Logging Framework #
A lightweight, flexible logging system for Spark Social with multiple outputs and log levels.
Features #
- 6 log levels: verbose, debug, info, warning, error, fatal
- Console and file outputs
- Automatic stack traces
- Color-coded console logs
- File rotation
Basic Usage #
// Get a logger
final logger = GetIt.instance<LogService>().getLogger('MyFeature');
// Log at different levels
logger.v('Verbose message');
logger.d('Debug message');
logger.i('Info message');
logger.w('Warning message');
logger.e('Error message', error: exception, stackTrace: stackTrace);
logger.f('Fatal message');
Predefined Loggers #
final logService = GetIt.instance<LogService>();
// Use predefined loggers
logService.appLogger.i('Application message');
logService.networkLogger.d('Network operation');
logService.uiLogger.w('UI warning');
Configure Log Levels #
// Set minimum log level
LoggerFactory.setGlobalLogLevel(LogLevel.warning); // production
LoggerFactory.setGlobalLogLevel(LogLevel.debug); // development
Log Levels #
- VERBOSE: Detailed debugging information
- DEBUG: Debugging information
- INFO: General application flow
- WARNING: Potential issues
- ERROR: Errors that impact functionality
- FATAL: Critical errors
- NOTHING: Special level to suppress logs