-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
How would we do this?
Current Crow architecture:
- singleton. We can configure application and woodpecker url. There's only one crow instance and therefore one application && url configuration.
Ideal behavior: be able to set multiple applications and choose between them.
Approach:
- change crow into constructor, construct and reuse multiple crow instances.
- Use something similar to winston's Transport to configure logging.
Winston's design with transport allows customizing destination, format, and log level. These are decoupled from the logger itself, to flexibly configure the logger's storage behavior.
In Woodpecker-land (forest?), the supports aren't that granular yet. But we can use transport to specify application for now, and expand format & custom levels in the future.
Winston also exposes a default logger, that makes it convenient when there's little configuration needed. Crow could adapt this design as well - maybe that's how we offer backward compatibility.
Metadata
Metadata
Assignees
Labels
No labels