-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Create an adapter package to integrate LogTape with bunyan, allowing applications using bunyan to easily incorporate LogTape-enabled libraries.
Context
This is part of the adapter package initiative from #52. Winston and Pino adapters have been completed, and now we need to implement the bunyan adapter.
Requirements
- Create
@logtape/adapter-bunyanpackage - Implement
getBunyanSink()function that bridges LogTape to bunyan - Support both default and custom bunyan logger instances
- Map LogTape log levels to bunyan equivalents
- Handle structured logging appropriately (bunyan is inherently structured)
- Include comprehensive tests and documentation
Usage Example
import { configure } from "@logtape/logtape";
import { getBunyanSink } from "@logtape/adapter-bunyan";
await configure({
sinks: {
bunyan: getBunyanSink(), // Use default bunyan instance
// or: getBunyanSink(existingBunyanLogger)
},
loggers: [
{ category: "awesome-pkg", sinks: ["bunyan"] }
]
});Implementation Notes
- Follow the same patterns established in winston and pino adapters
- Leverage bunyan's structured logging capabilities effectively
- Consider bunyan's child logger functionality for category mapping
- Handle bunyan's serializers appropriately
Related
- Adapter packages for popular logging libraries #52 (parent issue - now closed)
- Follows winston adapter (@logtape/adapter-winston)
- Follows pino adapter (@logtape/adapter-pino)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request