FileAppender and DateFileAppender for `base-log-factory`.
npm install blf-file-appender




> š FileAppender and DateFileAppender for base-log-factory.
---
For detailed usage instructions and API references, please visit the official documentation:
---
bash
npm install base-log-factory blf-file-appender
`$3
`typescript
// factory.ts
import { LogFactory } from 'base-log-factory';
import { FileAppender } from 'blf-file-appender';export default new LogFactory({
appenders: [
new FileAppender('./logs/app.log', {
layout: new PatternLayout('[%d{YYYY-MM-DDTHH:mm:ssZ}] [%p] %c - %m %x{userId}'),
maxSize: 1024 * 1024, // 1MB
backups: 5,
compress: true // Enable GZIP compression
})
]
});
// main.ts
import logFactory from './factory';
const logger = logFactory.getLogger('app');
logger.info('Server started successfully');
`---
š Contribution Guide
1. Development Setup
`bash
npm install
`2. Testing
`bash
npm test # Run unit tests
``3. Before Submitting PRs
- Ensure ESLint is configured (VSCode plugin recommended)
- Add test cases for new features
- Update documentation
---