Logging

Two types of logs are defined by a QvxLogFacility flag and four levels of log messages are defined by a QvxLogSeverity flag. When creating a log post, you must always (besides the message itself) set a facility and a severity for the message. For example:

QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Notice, "Init()");

The different facilities and severity levels are all documented in the DLL.

It is also possible to decide which messages are actually added to the log. Tthat is, during normal runtime you are most likely not interested in getting all debug messages, and maybe not even warnings. Use QvxLog.SetLogLevels() to switch warning and debug messages on and off:

QvxLog.SetLogLevels(bool LogDebug, bool logWarning);

Messages with severity Notice or Error are always included in the log.

The log files are saved in C:\ProgramData\QlikTech\Custom Data\{The name of the Connector}\Log. The log files can be imported into QlikView or Qlik Sense for further analysis. The following example script loads a log file generated by a connector into QlikView:

LOAD *

FROM

[C:\ProgramData\QlikTech\Custom Data\QvFacebookConnector\Log\2012-03-29QvxApplication.log]

(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

 

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?