logger property
- @protected
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 operationsDEBUG
: Configuration steps and lifecycle transitionsINFO
: Major lifecycle events (refresh, start, stop)WARN
: Non-critical issues and deprecationsERROR
: 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);