-
Notifications
You must be signed in to change notification settings - Fork 937
Description
Describe the bug
In this PR #551 a loglevel argument was added with reasoning "This is particularly helpful if you're using async-profiler in production and where you don't want to clubber your output with not always relevant log information"
Using Grafana Profiles we are looking at enabling "Continuous profiling" in production. However when enabling the profiler using Grafana Alloy agent we get a large amount of "Profiling started" log messages in our applications.
Looking at the source this and related messages seems to be written out to STDOUT without looking at loglevel.
We don't like to enable profiling in production if this means we can't control logging (and logging format) of our application.
Expected vs. actual behavior
"Profiling started" and related logs should honor the log level.
Reproduction Steps
- Start Java test program, eg
java -jar 'renaissance-gpl-0.15.0.jar' scrabble - Attach asprof
./asprof -L error <pid> - Observe application stdout:
====== scrabble (functional) [default], iteration 5 completed (573.007 ms) ======
====== scrabble (functional) [default], iteration 6 started ======
Profiling started
GC before operation: completed in 58.073 ms, heap usage 336.025 MB -> 78.046 MB.
====== scrabble (functional) [default], iteration 6 completed (448.292 ms) ======
====== scrabble (functional) [default], iteration 7 started ======
Additional Information/Context
No response
Async-profiler version
3.0
Environment details
No response