Skip to content

Commit

Permalink
test logs added
Browse files Browse the repository at this point in the history
  • Loading branch information
martind260 committed Nov 11, 2024
1 parent 342dd2e commit 8c7e945
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
package de.muenchen.mobidam;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
Expand Down Expand Up @@ -51,9 +52,14 @@
}
)
@EnableAutoConfiguration
@Slf4j
public class MicroServiceApplication {

public static void main(String[] args) {
Exception exc = new RuntimeException("myException");
log.error(exc.toString());
log.error("This is my exception: {}", exc.toString());
log.error("There is my exception", exc);
SpringApplication.run(MicroServiceApplication.class, args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
"fileName" : "%file",
"line" : "%line"
},
"message": "%message",
"thrown": "%thrown"
"message": "%message"
<!-- "exception": "%exception"-->
}
</pattern>
</pattern>
Expand Down

0 comments on commit 8c7e945

Please sign in to comment.