This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 21cf91c CAMEL-17209: camel-jfr - Java Flight Recorder should be
enabled if detected on classpath
21cf91c is described below
commit 21cf91cac6a6ed05fb53057ca214eb0b6f150bf1
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 18 22:11:52 2021 +0100
CAMEL-17209: camel-jfr - Java Flight Recorder should be enabled if detected
on classpath
---
.../camel/startup/jfr/FlightRecorderStartupStepRecorder.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/components/camel-jfr/src/main/java/org/apache/camel/startup/jfr/FlightRecorderStartupStepRecorder.java
b/components/camel-jfr/src/main/java/org/apache/camel/startup/jfr/FlightRecorderStartupStepRecorder.java
index 53cbcce..cdac120 100644
---
a/components/camel-jfr/src/main/java/org/apache/camel/startup/jfr/FlightRecorderStartupStepRecorder.java
+++
b/components/camel-jfr/src/main/java/org/apache/camel/startup/jfr/FlightRecorderStartupStepRecorder.java
@@ -44,6 +44,11 @@ public class FlightRecorderStartupStepRecorder extends
DefaultStartupStepRecorde
private Recording rec;
private FlightRecorderListener frl;
+ public FlightRecorderStartupStepRecorder() {
+ // should default be enabled if discovered from classpath
+ setEnabled(true);
+ }
+
@Override
public void doStart() throws Exception {
super.doStart();
@@ -65,7 +70,8 @@ public class FlightRecorderStartupStepRecorder extends
DefaultStartupStepRecorde
if (getStartupRecorderDuration() == 0) {
if (rec.getDestination() != null) {
rec.setDumpOnExit(true);
- LOG.info("Java flight recorder will be saved to file on
JVM exit: {}", rec.getDestination());
+ LOG.info("Java flight recorder with profile: {} will be
saved to file on JVM exit: {}",
+ getRecordingProfile(), rec.getDestination());
}
} else if (getStartupRecorderDuration() > 0) {
rec.setDuration(Duration.ofSeconds(getStartupRecorderDuration()));