Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more useful logging output #644

Open
ad-m opened this issue Jun 16, 2020 · 1 comment
Open

more useful logging output #644

ad-m opened this issue Jun 16, 2020 · 1 comment

Comments

@ad-m
Copy link
Contributor

ad-m commented Jun 16, 2020

As mentioned in #623 our aim is to create feature table documenting the supported S3 API surface.

I open this issue to discuss what possible approaches we have to this problem, to solve the problem in an effective way.

In terms of logs, it's worth thinking about:

  • who will use them and how (community feedback welcome!)
  • what solutions and standards exist in this area,
  • how to generate logs.

In terms of the log standard, we have standard log formats derived in particular from:

  • Apache (AFAIK Common Log Format)
  • Nginx
  • Traefik
  • Amazon S3 (via CloudWatch)
  • Elastic Load Balancing (via CloudWatch)
  • CloudFront (via CloudWatch)
  • Google Cloud Storage
  • Azure Files (?)
  • other (which one?)

It is also worth considering whether the format is structured or textual, and if textual, whether it is multiline or single-line.

Comments with examples of formats are welcome to make it easier to see what we are dealing with. I will try to collect them here regularly.

In terms of log consumer, it is worth mentioning:

  • classic ELK set, including grok,
  • GoAccess
  • syslog
  • other (what?)

Our configuration of logging is available at:
https://github.com/jamhall/s3rver/blob/3154cd6514b9aa919e7949149e60180d234a2703/lib/middleware/logger.js

@kherock
Copy link
Collaborator

kherock commented Feb 19, 2021

I think I'm going to attempt to recreate CloudTrail's logging output internally. We already do this to a short extent with S3 events. This refactor would replace all existing calls to the logger and event triggers.

Currently, the events API is only accessible via the JavaScript API with app.on('event', ...). This could be made accessible from the command line with a new --json option that should make S3rver's stdout to print as a NDJSON stream. Without this flag, logging events should continue to use a common-log-format-inspired output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants