forked from apache/camel-k
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed the deprecated --logging-level option (issue apache#2000)
- Loading branch information
Showing
5 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
docs/modules/ROOT/pages/observability/integration-logging.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[[integration-logging]] | ||
= Camel K Integration Logging | ||
|
||
Starting with https://camel.apache.org/blog/2021/05/new-camel-k-logging-features/[Camel K 1.5], we introduced a new | ||
xref:traits:logging.adoc[logging trait] that simplifies access to the logging configuration available on the runtime. | ||
|
||
|
||
[[integration-logging-level]] | ||
== Logging Level | ||
|
||
To configure the log level, pass one of the supported log levels to the trait. For example: | ||
|
||
``` | ||
--trait logging.level=DEBUG | ||
``` | ||
|
||
|
||
[[integration-logging-format]] | ||
== Logging Format | ||
|
||
The format of the logging message can also be configured using one of the supported log format options from | ||
https://quarkus.io/guides/logging[Quarkus] (which provides the logging framework for Camel Quarkus which is leveraged by | ||
Camel K). | ||
|
||
A sample custom configuration would look like this: | ||
|
||
``` | ||
--trait logging.format='%d{HH:mm:ss} %-5p (%t) %s%e%n'. | ||
``` | ||
|
||
[[integration-logging-structured]] | ||
== Structured Logs in Json Format | ||
|
||
Like the operator, the integrations will use structured logs to facilitate collection and parsing. This can be turned on | ||
or off using the `--trait logging.json` trait. Subsequently, it can also be customized to output pretty json logs by | ||
setting the `logging.json.pretty-print` trait. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[[logging]] | ||
= Camel K Logging | ||
|
||
The Camel K logging has two major areas. The first one is related to the logging provided by the | ||
xref:observability/operator-logging.adoc[operator itself], whereas the second is related to the | ||
xref:observability/integration-logging.adoc[integrations] ran by Camel K. |
16 changes: 16 additions & 0 deletions
16
docs/modules/ROOT/pages/observability/operator-logging.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[[logging]] | ||
= Camel K Operator Logging | ||
|
||
The Camel K Operator logging is mostly managed by the Kubernetes infrastructure, with some specific aspects managed by | ||
Camel K itself. The operator uses https://kubernetes.io/blog/2020/09/04/kubernetes-1-19-introducing-structured-logs/[structured logs] | ||
so that the logs are more easily parseable. | ||
|
||
This includes the output of components managed by the operator, such as the maven build, and the integration container build. | ||
For example, the maven build logs should be displayed like this: | ||
|
||
|
||
``` | ||
{"level":"info","ts":1620393185.321101,"logger":"camel-k.maven.build","msg":"Downloading from repository-000: http://my.repository.com:8081/artifactory/fuse-brno/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-bom/2.2.4/shrinkwrap-resolver-bom-2.2.4.pom"} | ||
``` | ||
|
||
There are some exceptions to this, though, and they are mostly related to running the operator for development purposes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters