-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
Description
About Me
This RFC is opened on behalf of NRK.
Use Case
Background
In the various Sofie apps (Core, Playout Gateway, Mos Gateway, Live Status Gateway, Package Manager etc..) we use slightly different logging methods. Most (all?) are base on the Winston logger, but have different configurations, which results in slight changes in logging between apps and non-type-safe logging methods.
I will be looking into how we can unify logging, and I am looking for input from the Sofie Community.
Initial project plan
(to be revised based on input)
- Make an opinionated, zero-config logging library, based on some other popular logging-library (candidates are Winston, pino, others?).
- The logging library will be exposed either as a part of
sofie-core-integrationor as it's own npm package. - The logger should log things in a pre-determined JSON structure. (This is important so that ElasticSearch/Kibana keywords are parsed properly).
- The logger should make logging of
Errorseasy. - The logger should provide helper methods for catching application-level events (such as
process.on('warning',() ={})etc). - The logger should have support for "categories" (ie create a new logger that will prefix logging with catebory breadcrumbs).
- (If needed??) The logger should be able to output logs in non-json (ie human readable) format, when developing.
Community input
I'd like input on things like:
- What is your opinion on havinig a unified logging api/library? Yay or Nay?
- Do you want to be included in discussions regarding this?
- Do you have an preferred in-house way or formatting of logging? (e.g: JSON with certain specified fields?) Do you have any specific requirements from your logging inftrastructure?
- Do you have good experience from other projects to share?
- Any other requirements you'd like to share?
- How is the current logging working for you? Any specific pain points?
Depending on the answers, I'll revise the project plan.
Proposal
(No proposal yet, looking for comments)
Process
The Sofie Team will evaluate this RFC and open up a discussion about it, usually within a week.
- RFC created
- Sofie Team has evaluated the RFC
- A workshop has been planned
- RFC has been discussed in a workshop
- A conclusion has been reached, see comments in thread