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

Feature request: print unique random tags #14

Open
qingvincentyin opened this issue Aug 13, 2021 · 3 comments
Open

Feature request: print unique random tags #14

qingvincentyin opened this issue Aug 13, 2021 · 3 comments
Assignees

Comments

@qingvincentyin
Copy link

I've come across your Docker image. It's very handy.

A feature request:

All the messages currently consist of very common words, and the entire sentence is fixed and repeated. When they are mixed with tons of other applications' logs in a data lake (e.g., in Elasticsearch, Datadog, Splunk, etc.), it is very hard to query for a particular message from your running container.

So, why not append each message with a dynamically generated random string -- each log line has a different, unique string. That will give the best of both worlds:

  1. You can query for the fixed part of your current message in order to get all messages from your particular container.
  2. You can also query for that random string to pinpoint a particular occurrence of a message.
@chentex
Copy link
Owner

chentex commented Aug 16, 2021

Thank you for your interest, this sounds like a interesting feature to implement. if I understand correctly it would be nice to have something like this:

2018-03-02T22:33:27-06:00 ERROR <random-string>
2018-03-02T22:33:27-06:00 INFO <random-string>
2018-03-02T22:33:27-06:00 WARN <random-string>
2018-03-02T22:33:27-06:00 DEBUG <random-string>

@chentex chentex self-assigned this Aug 16, 2021
@qingvincentyin
Copy link
Author

Correct.

@qingvincentyin
Copy link
Author

You also want a fixed portion of string per line. So, not the entire message body is a random string, but more like:

2018-03-02T22:33:27-06:00 ERROR An error is usually an exception <random-string>
2018-03-02T22:33:27-06:00 INFO  This is less important than debug <random-string>
...

That way, I can search by either the fixed portion of the log line, or the unique-per-line random string.

HemanthGangula pushed a commit to HemanthGangula/random-logger that referenced this issue Jul 21, 2024
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