You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/03/18 08:29:11 UTC

[camel] branch master updated (203ab63 -> 3959ccf)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 203ab63  Upgrade Localstack to version 0.12.8
     new c4ba991  Make camel-bundle-plugin less noisy by not logging harmless WARN
     new 3959ccf  Regen

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/camel-main-configuration-metadata.json    |   2 +-
 docs/components/modules/others/pages/main.adoc     |   2 +-
 .../apache/felix/bundleplugin/ManifestPlugin.java  |   4 +
 .../org/apache/felix/bundleplugin/PatchedLog.java  | 116 +++++++++++++++++++++
 4 files changed, 122 insertions(+), 2 deletions(-)
 create mode 100644 init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/PatchedLog.java


[camel] 02/02: Regen

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3959ccf06a1729c23d666f4a5e656102e0e1eb24
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 18 09:28:40 2021 +0100

    Regen
---
 .../apache/camel/catalog/main/camel-main-configuration-metadata.json    | 2 +-
 docs/components/modules/others/pages/main.adoc                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 3b4bd8f..b6089dc 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -77,7 +77,7 @@
     { "name": "camel.main.shutdownRoutesInReverseOrder", "description": "Sets whether routes should be shutdown in reverse or the same order as they were started.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true },
     { "name": "camel.main.shutdownSuppressLoggingOnTimeout", "description": "Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening. And during forced shutdown we want to avoid logging errors\/warnings et all in the logs as a side-effect of the forced timeout. Notice the suppress is a best effort as there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control. This option is defa [...]
     { "name": "camel.main.shutdownTimeout", "description": "Timeout in seconds to graceful shutdown Camel.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 45 },
-    { "name": "camel.main.startupRecorder", "description": "To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false, logging, java-flight-recorder The default is false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.main.startupRecorder", "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).", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String", "enum": [ "false", "off", "java-flight-recorder", "jfr", "logging" ] },
     { "name": "camel.main.startupRecorderDir", "description": "Directory to store the recording. By default the current directory will be used. Use false to turn off saving recording to disk.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.main.startupRecorderDuration", "description": "How long time to run the startup recorder. Use 0 (default) to keep the recorder running until the JVM is exited. Use -1 to stop the recorder right after Camel has been started (to only focus on potential Camel startup performance bottlenecks) Use a positive value to keep recording for N seconds. When the recorder is stopped then the recording is auto saved to disk (note: save to disk can be disabled by setting startupRec [...]
     { "name": "camel.main.startupRecorderMaxDepth", "description": "To filter our sub steps at a maximum depth. Use -1 for no maximum. Use 0 for no sub steps. Use 1 for max 1 sub step, and so forth. The default is -1.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": -1 },
diff --git a/docs/components/modules/others/pages/main.adoc b/docs/components/modules/others/pages/main.adoc
index 95ae22f..ac05dab 100644
--- a/docs/components/modules/others/pages/main.adoc
+++ b/docs/components/modules/others/pages/main.adoc
@@ -91,7 +91,7 @@ The following table lists all the options:
 | *camel.main.shutdownRoutesIn{zwsp}ReverseOrder* | Sets whether routes should be shutdown in reverse or the same order as they were started. | true | boolean
 | *camel.main.shutdownSuppress{zwsp}LoggingOnTimeout* | Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening. And during forced shutdown we want to avoid logging errors/warnings et all in the logs as a side-effect of the forced timeout. Notice the suppress is a best effort as there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control. This option is default false. |  | boolean
 | *camel.main.shutdownTimeout* | Timeout in seconds to graceful shutdown Camel. | 45 | int
-| *camel.main.startupRecorder* | To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false, logging, java-flight-recorder The default is false. |  | String
+| *camel.main.startupRecorder* | 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). |  | String
 | *camel.main.startupRecorderDir* | Directory to store the recording. By default the current directory will be used. Use false to turn off saving recording to disk. |  | String
 | *camel.main.startupRecorder{zwsp}Duration* | How long time to run the startup recorder. Use 0 (default) to keep the recorder running until the JVM is exited. Use -1 to stop the recorder right after Camel has been started (to only focus on potential Camel startup performance bottlenecks) Use a positive value to keep recording for N seconds. When the recorder is stopped then the recording is auto saved to disk (note: save to disk can be disabled by setting startupRecorderDir to false) |  | long
 | *camel.main.startupRecorderMax{zwsp}Depth* | To filter our sub steps at a maximum depth. Use -1 for no maximum. Use 0 for no sub steps. Use 1 for max 1 sub step, and so forth. The default is -1. | -1 | int


[camel] 01/02: Make camel-bundle-plugin less noisy by not logging harmless WARN

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c4ba9919767bca855bfd9304fdbf73996afff895
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 18 09:25:30 2021 +0100

    Make camel-bundle-plugin less noisy by not logging harmless WARN
---
 .../apache/felix/bundleplugin/ManifestPlugin.java  |   4 +
 .../org/apache/felix/bundleplugin/PatchedLog.java  | 116 +++++++++++++++++++++
 2 files changed, 120 insertions(+)

diff --git a/init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java b/init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
index 303ba1e..8944cbb 100644
--- a/init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
+++ b/init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
@@ -103,6 +103,10 @@ public class ManifestPlugin extends BundlePlugin {
             return;
         }
 
+        // avoid noisy logging
+        PatchedLog plog = new PatchedLog(getLog());
+        setLog(plog);
+
         Analyzer analyzer;
         try {
             analyzer = getAnalyzer(project, instructions, classpath);
diff --git a/init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/PatchedLog.java b/init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/PatchedLog.java
new file mode 100644
index 0000000..86895b8
--- /dev/null
+++ b/init/camel-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/PatchedLog.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.bundleplugin;
+
+import org.apache.maven.plugin.logging.Log;
+
+/**
+ * Patched logger that is not noisy.
+ */
+public class PatchedLog implements Log {
+
+    private final Log delegate;
+
+    public PatchedLog(Log delegate) {
+        this.delegate = delegate;
+    }
+
+    @Override
+    public boolean isDebugEnabled() {
+        return delegate.isDebugEnabled();
+    }
+
+    @Override
+    public void debug(CharSequence charSequence) {
+        delegate.debug(charSequence);
+    }
+
+    @Override
+    public void debug(CharSequence charSequence, Throwable throwable) {
+        delegate.debug(charSequence, throwable);
+    }
+
+    @Override
+    public void debug(Throwable throwable) {
+        delegate.debug(throwable);
+    }
+
+    @Override
+    public boolean isInfoEnabled() {
+        return delegate.isInfoEnabled();
+    }
+
+    @Override
+    public void info(CharSequence charSequence) {
+        delegate.info(charSequence);
+    }
+
+    @Override
+    public void info(CharSequence charSequence, Throwable throwable) {
+        delegate.info(charSequence, throwable);
+    }
+
+    @Override
+    public void info(Throwable throwable) {
+        delegate.info(throwable);
+    }
+
+    @Override
+    public boolean isWarnEnabled() {
+        return delegate.isWarnEnabled();
+    }
+
+    @Override
+    public void warn(CharSequence charSequence) {
+        // skip some unwanted WARN logging
+        String s = charSequence.toString();
+        if (s.startsWith("Include-Resource: overriding")) {
+            return;
+        }
+        delegate.warn(charSequence);
+    }
+
+    @Override
+    public void warn(CharSequence charSequence, Throwable throwable) {
+        delegate.warn(charSequence, throwable);
+    }
+
+    @Override
+    public void warn(Throwable throwable) {
+        delegate.warn(throwable);
+    }
+
+    @Override
+    public boolean isErrorEnabled() {
+        return delegate.isErrorEnabled();
+    }
+
+    @Override
+    public void error(CharSequence charSequence) {
+        delegate.error(charSequence);
+    }
+
+    @Override
+    public void error(CharSequence charSequence, Throwable throwable) {
+        delegate.error(charSequence, throwable);
+    }
+
+    @Override
+    public void error(Throwable throwable) {
+        delegate.error(throwable);
+    }
+}