Client Event Tracing

Besides Client Performance which will give you all the functions that are called and there timing you can also trace what events are clicked tha caused the call to those functions.

So this log logs Form.Component.EventName where EventName is something like "onAction","onDoubleClick" or "onFocus". Besides logging all events of the user it also logs the form show and hide events so you know which form is shown or hidden at what time

This way you can track how your application is used where users click on and what they show.

By default this is not enabled because the logger is by default not configured, to enabled this you need to change the log4j.xml file to have a Logger and an Appender:

The logger should be configured like:

        <Logger name="com.servoy.event.tracing" level="INFO" additivity="false">
            <AppenderRef ref="asynceventtracing" />
        </Logger>

the name is the log name Servoy will log to, the info level is the log level that is used for that. additivity=false means only log to the AppenderRef that is give, so it only logs to that file of that Appender

The appender can be something like this, we use here an async appender so the logging is done in a seperate thread:

        <RollingFile name="eventtracing"
            fileName="${log4j:configParentLocation}/eventtracing.txt"
            filePattern="${log4j:configParentLocation}/eventtracing-%i.txt.zip"
            immediateFlush="true" append="true">
            <Policies>
                <SizeBasedTriggeringPolicy size="10MB" />
            </Policies>
            <PatternLayout
                pattern="%d %m%n" />
        </RollingFile>
        <Async name="asynceventtracing">
            <AppenderRef ref="eventtracing" />
        </Async>

The output of the file will then be

time username|clientuuid|tenantArray|solution|form|component|eventname|args

or

time username|clientuuid|tenantArray|solution|form|FORM_SHOWN|true time username|clientuuid|tenantArray|solution|form|FORM_HIDE|true/false

Last updated