logger property

  1. @protected
Log logger
final

The logger associated with this application context.

Subclasses should use this logger for all logging activities related to context lifecycle, configuration, and operations.

Logging Levels:

  • TRACE: Detailed internal operations
  • DEBUG: Configuration steps and lifecycle transitions
  • INFO: Major lifecycle events (refresh, start, stop)
  • WARN: Non-critical issues and deprecations
  • ERROR: Critical failures and exceptions

Example:

@override
Future<void> refresh() async {
  logger.debug('Starting context refresh...');
  try {
    await super.refresh();
    logger.info('Context refreshed successfully');
  } catch (e) {
    logger.error('Context refresh failed', error: e);
    rethrow;
  }
}

Implementation

@protected
final Log logger = LogFactory.getLog(AbstractApplicationContext);