Closed dima-bzz closed 1 year ago
@sevdokimov Why are 2 loggers used?
@sevdokimov I think that saving the log to a file should be done inside the application.
Could you clarify what do you mean?
@sevdokimov Why are 2 loggers used?
What loggers do you mean?
@sevdokimov Why are 2 loggers used?
What loggers do you mean?
@sevdokimov logback and log4j inside log-viewer-cli.
Could you clarify what do you mean?
@sevdokimov I mean that you need to configure saving the log to a file inside the application. For example, via logback. Because if you use the system saving of the log to a file, then users will still have to take care of file rotation.
@sevdokimov Why are 2 loggers used?
What loggers do you mean?
@sevdokimov logback and log4j inside log-viewer-cli.
There is logback only in the release (in log-viewer/lib/* directory). The dependencies to org.apache.logging.log4j:log4j-api
and org.apache.logging.log4j:log4j-core
are optional and doesn't come to the build archive. They are used in com.logviewer.logLibs.log4j.Log4jConfigImporter only. Log4jConfigImporter is used when log-viewer is embedded to another application that uses log4J
@sevdokimov logback and log4j inside log-viewer-cli.
Oh, you mean why src/main/resources/log4j2.xml
exist? I don't know :) It is not used. I've removed it.
@sevdokimov I mean that you need to configure saving the log to a file inside the application. For example, via logback. Because if you use the system saving of the log to a file, then users will still have to take care of file rotation.
Do you know what is the right directory to store logs? I'm afraid that 'log-viewer' directory may be read-only.
@sevdokimov I think it's unlikely. And even if this happens, the user will know about it.
@sevdokimov We can try and look at the feedback. I will add the log saving to the file.
@sevdokimov We can try and look at the feedback. I will add the log saving to the file.
Ok. Don't forget to move src/main/resources/logback.xml
outside the jar, a user should be able to modify it.
@sevdokimov I will finalize the startup services tomorrow and add the log saving to the file.
@sevdokimov I think that saving the log to a file should be done inside the application.