Year after year, feature after feature, the diagnostic log has grown into a massive file on busy servers. With 4D v19R5, we included a new database parameter allowing you to choose the log level of the diagnostic log file. It will help you control the diagnostic log size by logging only what you really need.
The diagnostic log can be activated with the database parameter 79 (diagnostic log recording):
SET DATABASE PARAMETER (diagnostic log recording; 1)
You can then choose the log level with the database parameter 86 (log diagnostic level):
SET DATABASE PARAMETER (log diagnostic level; log trace)
There are 5 levels of logging:
- log error: To only log errors (unexpected disconnections, license problems, etc…).
- log warn: To log errors and warnings (missing fonts and similar issues).
- log info: Default level, log the important events (connection and disconnection of users, for example).
- log debug: Verbose level, useful for 4D support team when they investigate an issue.
- log trace: Most verbose level, useful for 4D development teams when working on a bug.
Of course, you can change all these parameters directly with the logs configuration file, as explained in this blog post.
Before v19R5, the default log level was the equivalent of the new trace level. So if you don’t change the log level, you will experience a drastic decrease in logging in the diagnostic log. You can set the diagnostic log level to trace to get back to the previous behavior.
Thanks to this new database parameter, you should be able to control the flow of logs in the diagnostic log, keeping it small while logging what you really need.
Feel free to share any comments with us on the official 4D forum.