question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a structured log system

See original GitHub issue

In 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:open
  • Created 4 years ago
  • Comments:30 (29 by maintainers)

github_iconTop GitHub Comments

1reaction
mraerinocommented, Feb 12, 2020

Please see the internal issue that david linked for more.

1reaction
jlengstorfcommented, Feb 6, 2020

@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 output

people 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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found