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-spring-boot.git
The following commit(s) were added to refs/heads/main by this push: new ee18e78 CAMEL-17420: camel-core - Add flag to turn on|off source loc:line ee18e78 is described below commit ee18e78fc6942a89c170c04af82b65a1657973dd Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Jan 4 16:42:05 2022 +0100 CAMEL-17420: camel-core - Add flag to turn on|off source loc:line --- core/camel-spring-boot/src/main/docs/spring-boot.json | 7 +++++++ .../apache/camel/spring/boot/CamelConfigurationProperties.java | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json b/core/camel-spring-boot/src/main/docs/spring-boot.json index e0997bc..1735db6 100644 --- a/core/camel-spring-boot/src/main/docs/spring-boot.json +++ b/core/camel-spring-boot/src/main/docs/spring-boot.json @@ -945,6 +945,13 @@ "defaultValue": 300 }, { + "name": "camel.springboot.source-location-enabled", + "type": "java.lang.Boolean", + "description": "Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime.", + "sourceType": "org.apache.camel.spring.boot.CamelConfigurationProperties", + "defaultValue": false + }, + { "name": "camel.springboot.startup-recorder", "type": "java.lang.String", "description": "To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, java-flight-recorder (or jfr).", diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java index 90b13ed..000351b 100644 --- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java +++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java @@ -364,6 +364,15 @@ public class CamelConfigurationProperties extends DefaultConfigurationProperties private boolean messageHistory = true; /** + * Whether to capture precise source location:line-number for all EIPs in Camel routes. + * + * Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK + * StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only + * impact startup, not the performance of the routes at runtime. + */ + private boolean sourceLocationEnabled; + + /** * Sets whether log mask is enabled or not. * * Default is false.