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

Coalesce repeating log messages #88

Closed
futuretap opened this issue Jan 1, 2013 · 12 comments
Closed

Coalesce repeating log messages #88

futuretap opened this issue Jan 1, 2013 · 12 comments

Comments

@futuretap
Copy link

Is there a way to coalesce repeating log messages similar to syslog?
Something like this:

Jan  1 13:04:22 log message
Jan  1 13:05:34 --- last message repeated 76 times ---
@bpoplauschi
Copy link
Member

@futuretap no there isn't, but it could. Are you interested in doing this?

@futuretap
Copy link
Author

Not that important that I'd invest the time digging deeper into the framework. Just thought I might have overseen it.

@rivera-ernesto
Copy link
Member

I think it would be up to the loggers to implement this:

  • Store the last message.
  • Compare new messages to the last one.
  • Either update the counter if equal or save the new last message and reset the counter.

The problem being that some loggers may not be able to update the last log output. For instance Xcode's console. So similar messages are delayed until a different message arrives.

@yvbeek
Copy link

yvbeek commented Jan 26, 2014

This would be a nice feature, but it might be quite difficult to implement properly.
In our case we have some repeating log messages but most of the time it's a set of log entries that is repeated, e.g.:

13:04:22.100 Log message A
13:04:22.105 Log message B
13:05:22.230 Log message A
13:05:22.236 Log message B

@bpoplauschi
Copy link
Member

Agree about the difficulty. Closing this for now, if there is anyone up to the task, feel free to reopen it

@rivera-ernesto
Copy link
Member

I think it is a good idea to keep feature requests' issues open as they haven't been addressed off-course, but also because it makes them more visible for someone looking to for tasks to help with.

@futuretap
Copy link
Author

@rivera-ernesto +1

@bpoplauschi bpoplauschi reopened this Feb 13, 2014
@bpoplauschi
Copy link
Member

I agree, even if I don't like seeing unattended issues, I think you are right.

@rivera-ernesto
Copy link
Member

Yeah, I know we love closing issues, but there's a better way to do so ;)

@bpoplauschi bpoplauschi added this to the 2.0.0 milestone Feb 20, 2014
@adamac
Copy link

adamac commented Mar 14, 2014

+1

@bpoplauschi bpoplauschi added this to the Future milestone Oct 23, 2015
@stale
Copy link

stale bot commented Oct 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.

@stale stale bot added the Stale label Oct 10, 2018
@bpoplauschi
Copy link
Member

I still think this feature can be done by writing/overwriting custom loggers, as mentioned above. They just need to retain the last message or so. Closing, this conversation is very old.

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

5 participants