There are two environment variables that can be set to enable the direct connect and sde_setup log creation. They are SDESVRLOGLOC and SDESVRLOGMODE. The SDESVRLOGLOC variable is required. This sets the location where the log files will be placed. The second, SDESVRLOGMODE, is optional. SDESVRLOGMODE can be used to enable verbose logging.
The SDESVRLOGLOC variable is used to set the location of the logs. No logs will be created if this variable is not present except the sde_setup log. The variable must be set to a valid/existing full directory path name where the server log file is to be created. For example: C:\Temp\
The server log file name will be DBMS dependent and in the sdedc_<dbms_name>.log format.
The sde_setup log will also be created in the directory specified by the SDESRVLOGLOC variable. This log is created by the Create Enterprise Geodatabase and Enable Enterprise geoprocessing tools. If this variable has not been set then the directory specified by the %TEMP% variable will be used. If no %TEMP% variable is set then the sde_setup log will not be created.
Setting this variable will turn on verbose logging for the direct connect log. The value for the SDESVRLOGMODE variable is V.