XML schema

The XML schema for the local log configuration file, LocalLogConfig.xml, is as follows:

<?xml version="1.0" encoding="utf-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="ParamType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="value" type="xs:string" use="required"/> </xs:complexType> <xs:simpleType name="AppenderNameType"> <xs:restriction base="xs:string"> <xs:pattern value="[^$].*"/> <!-- '$' is not allowed as prefix--> </xs:restriction> </xs:simpleType> <xs:complexType name="ConverterType"> <xs:sequence> <xs:element name="param" minOccurs="0" maxOccurs="unbounded" type="ParamType" /> </xs:sequence> </xs:complexType> <xs:complexType name="FilterType"> <xs:sequence> <xs:element name="param" minOccurs="0" maxOccurs="unbounded" type="ParamType" /> </xs:sequence> <xs:attribute name="class" type="xs:string" use="optional"/> <!-- log4cxx--> <xs:attribute name="type" type="xs:string" use="optional"/> <!-- log4net--> </xs:complexType> <xs:complexType name="EvaluatorType"> <xs:sequence> <xs:element name="param" minOccurs="0" maxOccurs="unbounded" type="ParamType" /> </xs:sequence> <xs:attribute name="class" type="xs:string" use="optional"/> <!-- log4cxx--> <xs:attribute name="type" type="xs:string" use="optional"/> <!-- log4net--> </xs:complexType> <xs:complexType name="LayoutType"> <xs:sequence> <xs:element name="converter" minOccurs="0" maxOccurs="unbounded" type="ConverterType" /> <xs:element name="param" minOccurs="0" maxOccurs="unbounded" type="ParamType" /> </xs:sequence> <xs:attribute name="class" type="xs:string" use="optional"/> <!-- log4cxx--> <xs:attribute name="type" type="xs:string" use="optional"/> <!-- log4net--> </xs:complexType> <xs:complexType name="AppenderType"> <xs:sequence> <xs:element name="filter" minOccurs="0" maxOccurs="unbounded" type="FilterType" /> <xs:element name="evaluator" minOccurs="0" type="EvaluatorType" /> <xs:element name="lossyevaluator" minOccurs="0" type="EvaluatorType" /> <!-- log4net--> <xs:element name="param" minOccurs="0" maxOccurs="unbounded" type="ParamType" /> <xs:element name="layout" minOccurs="1" type="LayoutType" /> </xs:sequence> <xs:attribute name="name" type="AppenderNameType" use="required"/> <xs:attribute name="class" type="xs:string" use="optional"/> <!-- log4cxx--> <xs:attribute name="type" type="xs:string" use="optional"/> <!-- log4net--> </xs:complexType> <xs:complexType name="AppenderRefType"> <xs:attribute name="ref" type="AppenderNameType" use="required"/> </xs:complexType> <xs:complexType name="RootType"> <xs:sequence> <xs:element name="appender-ref" type="AppenderRefType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> <xs:complexType name="LoggerType"> <xs:sequence> <xs:element name="appender-ref" type="AppenderRefType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute name="name" type="AppenderNameType" use="required"/> </xs:complexType> <xs:element name="configuration"> <xs:complexType> <xs:sequence> <xs:element name="appender" type="AppenderType" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="root" type="RootType" minOccurs="0" /> <xs:element name="logger" type="LoggerType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

Example:  

In this example, the local log configuration file is configured to write the system logs at debug level in %ProgramData%\Qlik\Sense\Log\Proxy\Debug_System_Proxy.txt.

<?xml version="1.0"?> <configuration> <appender name="LocalApp_AppenderSystem" type="Qlik.Sense.Logging.log4net.Appender.QSRollingFileAppender"> <param name="threshold" value="debug" /> <param name="encoding" value="utf-8" /> <param name="file" value="C:\ProgramData\Qlik\Sense\Log\Proxy\Debug_System_Proxy.txt" /> <param name="maximumfiletime" value="720" /> <param name="maximumfilesize" value="512KB" /> <layout type="log4net.Layout.PatternLayout"> <converter> <param name="name" value="rownum" /> <param name="type" value="Qlik.Sense.Logging.log4net.Layout.Pattern.CounterPatternConverter" /> </converter> <converter> <param name="name" value="longIso8601date" /> <param name="type" value="Qlik.Sense.Logging.log4net.Layout.Pattern.Iso8601TimeOffsetPatternConverter" /> </converter> <converter> <param name="name" value="hostname" /> <param name="type" value="Qlik.Sense.Logging.log4net.Layout.Pattern.HostNamePatternConverter" /> </converter> <converter> <param name="name" value="guid" /> <param name="type" value="Qlik.Sense.Logging.log4net.Layout.Pattern.GuidPatternConverter" /> </converter> <converter> <param name="name" value="serviceuser" /> <param name="type" value="Qlik.Sense.Logging.log4net.Layout.Pattern.ServiceUserNameCachedPatternConverter" /> </converter> <converter> <param name="name" value="encodedmessage" /> <param name="type" value="Qlik.Sense.Logging.log4net.Layout.Pattern.EncodedMessagePatternConverter" /> </converter> <converter> <param name="name" value="encodedexception" /> <param name="type" value="Qlik.Sense.Logging.log4net.Layout.Pattern.EncodedExceptionPatternConverter" /> </converter> <param name="ignoresexception" value="false" /> <param name="header" value="Sequence#&#x9;Timestamp&#x9;Level&#x9;Hostname&#x9; Logger&#x9;Thread&#x9;Id&#x9;ServiceUser&#x9;Message&#x9;Exception&#x9; ActiveUserDirectory&#x9;ActiveUserId&#x9;ProxyTimestamp&#x9;ProxyThread&#x9; Id2&#xD;&#xA;" /> <param name="conversionpattern" value="%rownum{9999}&#x9;%longIso8601date&#x9; %level&#x9;%hostname&#x9;%logger&#x9;%thread&#x9;%guid&#x9;%serviceuser&#x9; %encodedmessage{1000000}&#x9;%encodedexception{innermostmessage:1000000}&#x9; %property{ActiveUserDirectory}&#x9;%property{ActiveUserId}&#x9; %property{ProxyTimestamp}&#x9;%property{ProxyThread}&#x9;%guid%newline" /> </layout> </appender> <logger name="System.Proxy"> <appender-ref ref="LocalApp_AppenderSystem" /> </logger> </configuration>

See also: