You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current implementation uses System.out and System.err to output debug information, but it should be avoided in production code. Because using stdout and/or stderr directly makes system maintenance difficult, it doesn't support filtering base on log level nor class. It is also hard to apply log rotation and other log management mechanism.
I cannot judge which logger API we should use, probably it is one of followings:
SLF4J API, which is common in Java ecosystem
JUL (java.util.logging) API, which is standard in Java but little bit hard to maintain
It is OK to use System.err and System.out in main class such as SudachiCommandLine.java and PrintDictionaryHeader.java. But at least DictionaryBuilder.java should use logger interface.
It seems that SLF4J is not so active recently, then I recommend to use Log4J 2.
If I was you, I will introduce logger system eventually. It makes product easy to introduce --debug, --verbose or other flags with keeping performance and readability.
Current implementation uses
System.out
andSystem.err
to output debug information, but it should be avoided in production code. Because using stdout and/or stderr directly makes system maintenance difficult, it doesn't support filtering base on log level nor class. It is also hard to apply log rotation and other log management mechanism.I cannot judge which logger API we should use, probably it is one of followings:
The text was updated successfully, but these errors were encountered: