Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gallolabs/logger
Simple and powerfull javascript logger
https://github.com/gallolabs/logger
logger
Last synced: 29 days ago
JSON representation
Simple and powerfull javascript logger
- Host: GitHub
- URL: https://github.com/gallolabs/logger
- Owner: gallolabs
- Created: 2023-12-17T18:14:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T21:01:34.000Z (3 months ago)
- Last Synced: 2024-10-28T21:44:07.361Z (3 months ago)
- Topics: logger
- Language: TypeScript
- Homepage:
- Size: 218 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Gallo logger
Simple logger:
- [x] log -> processors -> obfuscation -> handlers (own processors + format + transport)
- [x] Advanced childs (not only id and metadata but also own processors and handlers stack), siblings, and extends
- [x] Default simple JSON console logging
- [x] logfmt formatter available
- [x] BreadCrumb handler (like Monolog Fingers crossed handler) : keep some verbose logs in memory until an error-like log is logged. Kept verbose logs are flushed with it. Verbose logs are kept on a logger chain (parent/child) to flush only (as possible) relevant logs.
- [x] Error handler
- [x] Idle wait method
- [ ] Move filter (level) logic to logger ? Create intermediate handler ? Create a mapping filter<->handler with potentially advanced filters (on metadata etc) ?
- [ ] Reduce complexity as remote-ee with only 1 root instance and others child instances, and change onError by events ?```typescript
const logger = createLogger({...})
// loggerId can be any type
const child = logger.child({ component: 'http-server', alias: 'public-server' })
const child = logger.child('public-server', {child: true})child.info('My log', {password: 'secret'})
// Will log {level: 'info', message: 'My log', password: '***', child: true, timestamp: '(date)', logger: 'public-server'}
```