KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Starting the debug logs
PRODUCT: 4D | VERSION: 14.3 | PLATFORM: Mac & Win
Published On: February 27, 2015

4D has a built in logging system that records the events occurring in an application at the 4D programming level. The logs will track which 4D commands are called. These logs are referred to as the debug logs, and can be started on a standalone 4D application using SET DATABASE PARAMETER with selector 34. In a client server setup, the logs can also be started through the server's administration window's Maintenance tab.



Note: In a client/server setup, the location the logging is started matters. If the logging is started on the server, the logs will only capture events that occur on the server, visa versa for client. This means that if the debug logging is started through the server administration window on a client, the logging will occur on the server. On the other hand, if the logging is started programatically using SET DATABASE PARAMETER on the client, the logging will occur on the client. Likewise, if SET DATABASE PARAMETER is ran on the server, the logging will occur on the server.

Below is information about the location of the logs generated.

Started on Server

  • Win: <Location of database>\Logs\
  • Mac: <Location of database>:Logs:

Started on Client
  • Win: C:\Users\<username>\AppData\Local\4D\<DatabaseName_IP_Address>\Logs\
  • Mac: Macintosh HD:Users:<username>:Library:Caches:4D:<DatabaseName_IP_Address>:Logs:

Single User
  • Win: <Location of database>\Logs\
  • Mac: <Location of database>:Logs:


Debug logs generated in 4D v14 are different than the logs generated in v13. The difference is layed out in the following tech tip: http://kb.4d.com/assetid=77076

Users are given the ability to switch debug log to a certain version if they desire. To do this, use the SET DATABASE PARAMETER command, and specify a second parameter.

SET DATABASE PARAMETER (34;1)   //enables mode v13 file without parameters, with runtimes
SET DATABASE PARAMETER (34;2)   //enables mode v13 file with parameters and runtimes
SET DATABASE PARAMETER (34;2+4) //enables file with v14 format


Note: If the debug logging is started through the server's administration window in version 14, by default, the debug logs will be started in the v14 mode (SET DATABASE PARAMETER (34;2+4)).