Skip to content

feat: implement simplified logging level system for enhanced audio de…#1548

Draft
danielgomezriconeon wants to merge 2 commits into
ryanheise:minorfrom
NEONSCREENS:feature/enhanced-logging-system
Draft

feat: implement simplified logging level system for enhanced audio de…#1548
danielgomezriconeon wants to merge 2 commits into
ryanheise:minorfrom
NEONSCREENS:feature/enhanced-logging-system

Conversation

@danielgomezriconeon

@danielgomezriconeon danielgomezriconeon commented Sep 15, 2025

Copy link
Copy Markdown

Context

Configurable Logging System

  • Added AudioPlayerLogging class with enabled = false default
  • Added BackgroundAudioLogging class with enabled = false default
  • Granular category controls (queue, platform, error, performance, etc.)

Enhanced Error Context

  • SCENARIO A analysis for RangeError issues
  • SCENARIO B analysis for IllegalArgumentException issues
  • Complete state snapshots before/after operations

Operation Lifecycle Tracking

  • Correlation IDs for tracing operations
  • Pre/post operation state logging
  • Concurrent operation detection

Performance-Optimized

  • Conditional logging checks to minimize overhead
  • Default disabled for production safety
  • Non-blocking logging implementation

Comprehensive Documentation

  • Usage guide with examples
  • Configuration options
  • Best practices for development and production

How to use it

AudioPlayerLogging.setLevel(LogLevel.DEBUG);
BackgroundAudioLogging.setLevel(LogLevel.DEBUG);

…bugging

- Replace complex granular logging configuration with intuitive LogLevel enum
- Add LogLevel.VERBOSE, DEBUG, INFO, ERROR, OFF levels with automatic category management
- Maintain backward compatibility with deprecated methods
- Consistent API across just_audio and just_audio_background packages
- Add comprehensive documentation and migration guide
- Enable single-line logging configuration: setLevel(LogLevel.DEBUG)
- Improve debugging experience for RangeError and IllegalArgumentException issues
- Default LogLevel.OFF ensures zero production performance impact

Breaking changes: None (backward compatible)
Migration: Replace enableAll()/disableAll() with setLevel() for cleaner API

Remove docs

--amend
@danielgomezriconeon danielgomezriconeon force-pushed the feature/enhanced-logging-system branch from b4c3b2b to bf8da60 Compare September 15, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant