File tree Expand file tree Collapse file tree 1 file changed +13
-18
lines changed
Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -265,31 +265,26 @@ For 'classic' one-line log output when running a server locally, additionally ad
265265 <summary >Gradle bootRun example</summary >
266266
267267``` groovy
268- bootRun {
269- dependencies {
270- implementation("no.entur.logging.cloud:spring-boot-starter-gcp-web-test")
271- implementation("no.entur.logging.cloud:request-response- spring-boot-starter-gcp-web-test")
272- }
268+ tasks.register("logPlainly") {
269+ dependencies {
270+ implementation("no.entur.logging.cloud:request-response- spring-boot-starter-gcp-web-test")
271+ implementation("no.entur.logging.cloud:spring-boot-starter-gcp-web-test")
272+ }
273273}
274- ```
275274
276- </details >
275+ tasks.withType(JavaExec).configureEach {
276+ dependsOn("logPlainly")
277+ }
278+ ```
277279
278- ## Toggle output mode using profiles
279- Add an event listener to set your preferred log output:
280+ Then configure desired output by specifying ` entur.logging.style `
280281
281282```
282- @Component
283- @Profile("local")
284- public class HumanReadableJsonApplicationListener implements ApplicationListener<ContextRefreshedEvent> {
285-
286- @Override
287- public void onApplicationEvent(ContextRefreshedEvent event) {
288- CompositeConsoleOutputControl.useHumanReadableJsonEncoder();
289- }
290- }
283+ entur.logging.style=humanReadablePlain|humanReadableJson|machineReadableJson
291284```
292285
286+ </details >
287+
293288## Troubleshooting
294289
295290### request-response logging not working
You can’t perform that action at this time.
0 commit comments