This log value is used to get only error messages in the logs.
此日志值用于仅获取日志中的错误消息。
It is a good practice to guard log statements so they are turned on during error and debugging situations only.
最佳实践应是对日志语句加以保护,使其仅在出错和进行调试的情况下打开。
With synchronous log writing, one record may be lost because the error could only prevent, at most, one audit record from being written.
如果同步写日志,那么只会丢失一条记录,因为发生的错误最多只能阻止一条审计记录被写到磁盘。
Obviously, this would only be desirable during development — at runtime it would be preferable to log this failure to a log4j error stream or something equally less distracting to the user.
很明显,只有在开发过程中这样做才是理想的——在运行时最好将这个错误记录到log4j错误流中,或者记录到不会影响用户的类似内容中。
For example, we will be able to direct only critical error messages to the log file (to save disk space), while still being able to print all of the log messages on the console.
例如,我们可以仅指示存储致命错误消息到日志文件(存储到硬盘),然而仍然可以在控制台打印所有消息。
For example, we will be able to direct only critical error messages to the log file (to save disk space), while still being able to print all of the log messages on the console.
例如,我们可以仅指示存储致命错误消息到日志文件(存储到硬盘),然而仍然可以在控制台打印所有消息。
应用推荐