When is the appropriate time for code configuration initialization? #379
Unanswered
whatisjava
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When configuring entirely through code as per the example, do I need to add the configureLogbackDirectly() method in the onCreate of each Activity? I tried calling the configureLogbackDirectly() method only in the onCreate of the application's Application class, but I noticed that sometimes no log information is generated. I'm not sure if this is related to my use of the @HiltAndroidApp annotation
object LogbackConfig {
// rollingFileEncoder.pattern = "[%date{yyyy-MM-dd HH:mm:ss.SSS}] %-5level %logger{0}.%M\(%F:%L\): - %msg%n"
rollingFileEncoder.pattern = "[%date{yyyy-MM-dd HH:mm:ss.SSS}] %-5level %logger{0}: - %msg%n"
rollingFileEncoder.charset = Charset.forName("UTF-8")
rollingFileEncoder.start()
}
Beta Was this translation helpful? Give feedback.
All reactions