Add a structured log system
See original GitHub issueIn an effort to support future UI work in app.netlify.com, we need to allow for plugins to output logs.
These logs will:
- Be consumed by netlify UI
- Be shippable to third party logging systems
- …
The idea is to capture console.log
and any other output returned from plugins and save them to a structured log file.
Those structured log objects should:
- be converted to human-friendly console output. I.e. the user does not see them, they are under the hood.
- be output to files
- be passed to plugins such as log shipping plugins
Issue Analytics
- State:
- Created 4 years ago
- Comments:30 (29 by maintainers)
Top Results From Across the Web
What Is Structured Logging and How to Use It - Loggly
Structured logging makes this easier by generating logs in more easily parsable formats—such as JSON and XML. This way, you can treat your...
Read more >Saving Time with Structured Logging - Reflectoring
Plain text logs are hard to process. Use structured log events to make the information searchable and filterable.
Read more >Structured logging - Google Cloud
This document discusses the concept of structured logging and the methods for adding structure to log entry payload fields.
Read more >What Is Structured Logging and Why Developers Need It
The goal of structured logging is to bring a more defined format and details to your logging. We have been practicing structured logging...
Read more >Structured Logging in ASP.NET Core with Serilog - Code Maze
A great tool to view structured logs is Seq. There is a free version that we can install on local machines, so let's...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please see the internal issue that david linked for more.
@RaeesBhatti @ehmicky monkey-patching or capturing are tricky — providing an explicit output API and ignoring console logs is what I’d love to see instead
there’s no way to be sure whether another library is monkey-patching
console
, and if someone installs a noisy package we don’t necessarily want that in the log outputpeople are already learning how to create build plugins, so telling them that “the way to print a message in Netlify’s build log is to import the
logger
util” doesn’t seem unreasonable or overly cumbersome