logging
Installation
SKILL.md
Logging
Pattern: Explicit Constructor Injection
Loggers are passed explicitly via constructor injection throughout the codebase. There is no global/ambient logger.
import type { Logger } from '@repo/shared';
class MyService {
constructor(private logger: Logger) {}
async doWork(context: WorkContext) {
const childLogger = this.logger.child({ operation: 'work' });
childLogger.info('Working', { context });
}
}