DLL Logging

Follow

Enabling Logging

To enable logging in the Ares DLL, you will need to create a new file with the text below. This file needs to be saved as log4d.props on the web server in the same directory where the ares.dll is running (usually C:\inetpub\wwwroot\Ares).

DLL Logging should only be enabled to aid in the diagnosis of a problem because the log files tend to get large quickly.

 

The text of the log4d.props file should be:

#---- begin log4d.props ----
log4d.debug=TRUE

log4d.loggerFactory=TLogDefaultLoggerFactory

# root priority - valid values are 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'
log4d.rootLogger=INFO,ROOT

# root appender
log4d.appender.ROOT=TLogRollingFileAppender
log4d.appender.ROOT.append=TRUE
log4d.appender.ROOT.fileName=C:\Ares\Logs\AresDLL.log
log4d.appender.ROOT.errorHandler=TLogOnlyOnceErrorHandler
log4d.appender.ROOT.layout=TLogPatternLayout
log4d.appender.ROOT.layout.dateFormat=yyyy-mm-dd hh:MM:ss,zzz
log4d.appender.ROOT.layout.pattern=%d [%p] %c (%t) - %m%n
log4d.appender.ROOT.maxBackupIndex=9
log4d.appender.ROOT.maxFileSize=4MB
#---- end log4d.props ----

 

The DLL will now log to a file called C:\Ares\Logs\AresDLL.log. This can be edited to another name or location. If you have multiple web folders (shared server or using test web), you can make a different log4d.props file in each web folder that points to another file name for that log. 

In Ares 4.6.5 and later the actual log file name has been changed to be a derivative of the name provided in the configuration. The actual log file will be in the same path, but the name will be modified to be of the format <BASE FILENAME>_<UNIX_TIME>_<PROCESS ID>.<EXTENSION>. For example, with a specified log4d.appender.ROOT.fileName value of 'C:\Ares\Logs\AresDLL.log' an actual log file would be similar to 'C:\Ares\Logs\AresDLL_1478002551_4368.log'.

 

You may need to change the permissions on the C:\Ares\Logs\ directory to allow the Internet Guest Account (IUSR_ARES or similar) to create and write to a file. That file may not allow you to open it while the dll is still running. You may need to stop and restart the web server to open the file.

Disabling Logging

To disable logging in the Ares DLL, rename the log4d.props file to something else (i.e. disable-log4d.props). If the DLL cannot find that file, it will not log any actions.

Questions?

If this article didn’t resolve your issue, please take a moment and answer a few questions to help improve our documentation:

Feedback