Logs not printing method line number


When Console or file logs are getting printed, Line number are not getting printed with method name.

I am using below logger
Logger log = org.slf4j.LoggerFactory.getLogger

below logs is getting printed without line number where logger is added
2022-09-22 12:13:02.854 INFO 10557 — [nio-8083-exec-6] c.m.m.screen.fileuploads.FileUpload

Add src/main/resources/logback-spring.xml file as described in this guide and use %line in the pattern to output line numbers.

Thanks for the solution it worked.