Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document use of logging.config JVM option. #1671

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/src/modules/java/pages/running-locally.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,19 @@ This time, `kalix:runAll` will start `docker-compose-integration.yml` instead. T
Note that the configuration is exactly the same except that now we are running one single `mvn kalix:runAll` command and the `docker-compose` file we are using contains all the dependencies required by *customer-registry-subscriber*.

This approach can be extended to any service you might want to integrate with. It can be any other Kalix service that you plan to deploy to the same Kalix project or even external services. The only requirement is to have a Docker image for it.

== Logging Settings when Running Locally
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to document it, but it is given the impression that you always need it. This is only needed when running Main.class directly from an IDE.

When running mvn kalix:run or mvn kalix:runAll (available since v1.2.1), you don't need to pass anything. It will configure the service to use logback-dev-mode.xml automatically.

That said, I think this part of the docs must be more explicitly about when running from the IDE.

The default logback.xml in Kalix sets a JSON formatter for your log messages.
The formatter setting and other settings may not be appropriate when running locally.
For this reason, you may want to keep a separate logback-dev-mode.xml with settings that fit your local development.
In order to enable it, you can use the JVM option:

====

====
--
[source,command line]
----
-Dlogging.config=src/main/resources/logback-dev-mode.xml
----
--