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

Allow disabling of violation logging #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rossjones
Copy link

@rossjones rossjones commented May 3, 2023

When some tasks take too long, a violation is logged using the default logging package. We don't want to add more dependencies to this package, but we also don't want to log these violations in every circumstance (e.g. when used in a CLI).

When used from a CLI the user often sees the following which is likely meaningless to them.

2023/05/03 08:26:01 CleanupManager.fnsMutex violation CRITICAL section took 254.031ms 254031000 
(threshold 10ms)

Allows the caller creating a tracing mutex to specify they want to Disable violation logging. Currently defaults to false, so that violations are logged and the called has to explicitly disable them.

When some tasks take too long, a violation is logged using the default
logging package.  We don't want to add more dependencies to this
package, but we also don't want to log these violations in every
circumstance (e.g. when used in a CLI).

Allows the caller enabled a tracing mutex to specify they want to
Disable violation logging.
@rossjones rossjones requested a review from simonwo May 3, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant