# Client Event Tracing

Besides [Client Performance](/guides/deploy/server-configuration/monitoring/client-performance.md) 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/guides/deploy/server-configuration/monitoring/client-tracing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
