added logging traits documentation
ADD
examples/traits/logging/README.md
+# Logging Trait
+
+This type of trait tells us what is going on in a running integration pod. It does this by printing logs out to the standard output.
+
+Logs are enabled by default on an integration. Just run this example:
+
+ $kamel run logging.java
+
+ $kamel logs logging
+
+Or you can instead get the pod name and print its logs using kubectl:
+
+ $kubectl get pods
+
+ $kubecttl logs <pod name>
+
+You can configure the log output with the `logging traits` flag:
+
+Property | Type | Description
+---|---|---
+logging.enabled | boolean| We can set to false to disable logging
+logging.color | boolean| makes logging output colorful. This makes skimming through the logs easier.
+logging.json | boolean | Makes logs output to be in json format. We can use tools like `jq` to manipulate output.
+logging.json-pretty-print | boolean | It's like using an in built `jq` to print our json output.
+logging.level | string | This is just a verbosity level settings. We can just use `info`
+
+for more traits options see this [Link.](https://camel.apache.org/camel-k/next/traits/logging.html).
+
+manual log setting example using `logging trait`:
+
+ $kamel run ./logging.java --trait logging.enabled=true --trait logging.json=true --trait logging.level=info
+
+The output of this result would give this:
+- Logging would be enabled, but there would be no colors for easy skimming.
+- You would need to use your own jq to pretty print and parse the json output.
+
+**Image example**
+![json](interface/json.png)
+
+
+## using modeline
+An example of using a `modeline` to set the `logging traits` :
+
+ $kamel run ./loggingModeline.java
+

ADD
examples/traits/logging/interface/json.png
examples/traits/logging/interface/json.png
Binary files /dev/null and b/examples/traits/logging/interface/json.png differ

ADD
examples/traits/logging/logging.java
+/*
+ * 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.
+ */
+
+//
+// kamel run ./logging.java --trait logging.enabled=true \
+// --trait logging.json=true --trait logging.level=info
+import org.apache.camel.Exchange;
+
+public class RestDSL extends org.apache.camel.builder.RouteBuilder {
+ @Override
+ public void configure() throws Exception {
+ rest()
+ .get("/hello")
+ .to("direct:hello");
+
+ from("direct:hello")
+ .setHeader(Exchange.CONTENT_TYPE, constant("text/plain"))
+ .transform().simple("Hello World");
+ }
+}

ADD
examples/traits/logging/loggingModeline.java
+/*
+ * 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.
+ */
+
+// camel-k: traits=logging.enabled=true trait=logging.json=true trait=logging.level=info
+
+import org.apache.camel.Exchange;
+
+public class RestDSL extends org.apache.camel.builder.RouteBuilder {
+ @Override
+ public void configure() throws Exception {
+ rest()
+ .get("/hello")
+ .to("direct:hello");
+
+ from("direct:hello")
+ .setHeader(Exchange.CONTENT_TYPE, constant("text/plain"))
+ .transform().simple("Hello World");
+ }
+}

added logging traits documentation