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

Log a message indicating when a message type has been limited #2

Open
knoepfel opened this issue Oct 28, 2021 · 5 comments
Open

Log a message indicating when a message type has been limited #2

knoepfel opened this issue Oct 28, 2021 · 5 comments
Labels
feature An enhancement to the project

Comments

@knoepfel
Copy link
Contributor

knoepfel commented Oct 28, 2021

This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/3271 (FNAL account required)
Originally created by Peter Shanahan on 2013-01-12 14:52:08


I don't think this exists...

Can MF automatically generate a message when a given message type starts being throttled by limit?

E.g., category "Update" has a limit of 5, so we would have something like

MyApp: Update 1
MyApp: Update 2
MyApp: Update 3
MyApp: Update 4
MyApp: Update 5
MessageFacility: Msg-i Throttle "MyApp: Category 'Update' has been limited"
MyApp: Update 10
etc...

And, maybe, if timespan was set, when the timespan was hit
MessageFacility: Msg-i Throttle "MyApp: Category 'Update' limit reset"

Please due date with a grain of salt.


Related issues:

@knoepfel knoepfel added feature An enhancement to the project high priority This issue needs timely action labels Oct 28, 2021
@knoepfel
Copy link
Contributor Author

Comment by @chissg on 2013-08-19 16:39:50


This may reasonably be done as a drive-by as part of the implementation of Redmine issue 3571.

@knoepfel
Copy link
Contributor Author

Comment by @ron003 on 2017-10-23 18:44:56


I would like to see this feature implemented.
Silently dropping log messages is usually not good, IMHO.
Additionally, (perhaps assuming no exponential back-off), a message should/could be added after the
limiting (associated with the first non-limited message) that indicates how many messages have
be limited/dropped.

@knoepfel
Copy link
Contributor Author

Comment by @chissg on 2017-10-26 15:20:52


Minor note: the end-of-execution summary should always tell you how many times a message was issued, not how many times it was printed.

@knoepfel
Copy link
Contributor Author

Comment by @knoepfel on 2017-10-30 16:59:24


Message statistics, which include the number of times messages from a given category were logged or printed, can be displayed by setting the outputStatistics configuration parameter to true for any given destination.

Implementing the above feature is straightforward, the question is whether such a feature should be scheduled soon, due to our current demands implementing multi-threaded art. Please let us know urgent this feature is.

@knoepfel
Copy link
Contributor Author

Comment by @ron003 on 2017-11-07 19:08:54


Sorry I didn't notice this earlier.
It doesn't seem to be too urgent in the grand scheme as another issue I just filed is higher priority.
I can't seem to get the statistics to print.
I've tried:
debugModules : ["*"]
destinations : {
xxx: {
type:cout
format:{wantSomeContext:false}
threshold:DEBUG
categories:{default:{limit:4 timespan:1 reportEvery:2}}
outputStatistics:true
resetStatistics:false
}
}

But this does not seem to work.
I'll attach an example program

@knoepfel knoepfel added this to Issues Oct 29, 2021
@knoepfel knoepfel removed the high priority This issue needs timely action label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature An enhancement to the project
Projects
Status: No status
Development

No branches or pull requests

1 participant