Skip to content

EnableLog

Navigation: ADLX SDK ReferencesADLX InterfacesSystemIADLXSystem

Syntax

ADLX_RESULT    EnableLog (ADLX_LOG_DESTINATION mode, ADLX_LOG_SEVERITY severity, IADLXLog* pLogger, const wchar_t* fileName)

Parameters

#DirectionNameTypeDescription
1.[in]modeADLX_LOG_DESTINATIONThe log destination.
#DirectionNameTypeDescription
---------------
2.[in]severityADLX_LOG_SEVERITYThe logging severity.
#DirectionNameTypeDescription
---------------
3.[in]pLoggerIADLXLogThe pointer to the log interface to receive log messages from ADLX.
#DirectionNameTypeDescription
---------------
4.[in]fileNameconst wchar_t*The zero-terminated string that specifies the path of the log file.

Return Value

If EnableLog is successfully executed, ADLX_OK is returned.

If EnableLog is not successfully executed, an error code is returned.

Refer to ADLX_RESULT for success codes and error codes.

Remarks

By default, ADLX logging is disabled. Use EnableLog to configure log destination and severity.

  • To configure the log destination into a file, specify the mode parameter as LOCALFILE and provide the file path in the filename parameter. The pLogger parameter must be nullptr.
  • To configure the log destination into the output window of the debugger, specify the mode parameter as DBGVIEW. The filename and pLogger parameters must be nullptr.
  • To configure the log destination to be sent as a string into the application, specify the mode parameter as APPLICATION. Implement the IADLXLog interface in the application and pass a pointer to an instance of that interface into the pLogger parameter. The log instance must exist until ADLX is terminated. The filename parameter must be nullptr.
  • To obtain the error messages in the ADLX execution code, specify the severity parameter as LERROR.
  • To obtain the error and warning messages in the ADLX execution code, specify the severity parameter as LWARNING.
  • To obtain error, warning, and debug tracing messages in the ADLX execution code, specify the severity parameter as LDEBUG.

Requirements

Headerinclude “ISystem.h”
Minimum version1.0

See Also: IADLXLog, ADLX Enums