Configuring the OPC UA Application Tracing

The trace settings of the OPC UA application configuration file define diagnostic logging and tracing. Complete the following settings in the TraceConfiguration section.

Setting

Value

Description

OutputFilePath

%LocalApplicationData%/OPC Foundation/Logs/FwxServer.log.txt

The log file location.

DeleteOnLoad

true

Deletes the log file on the application start.

TraceMasks

0

Current trace mask (disabled).

Trace Masks

Trace masks are bit flags that control which events are logged. The configuration supports the following masks.

Mask

Value

Description

Use Case

None

0

No tracing

Production (not recommended)

Error

1

Errors only

Production

Information

2

Informational messages

General debugging

StackTrace

4

Stack traces

Error analysis

Service

8

Service calls

API debugging

ServiceDetail

16

Detailed service info

Deep API debugging

Operation

32

Operations

General operations

OperationDetail

64

Detailed operations

Deep operation debugging

StartStop

128

Start/stop events

Lifecycle debugging

ExternalSystem

256

External system calls

Integration debugging

Security

512

Security events

Security auditing

The server detects trace mask changes within 5 seconds.

Common Combinations

<!-- Errors Only --> <TraceMasks>1</TraceMasks> <!-- Security and Errors --> <TraceMasks>513</TraceMasks> <!-- Security, Errors, and Trace --> <TraceMasks>515</TraceMasks> <!-- Security, Service Calls, Errors, and Trace --> <TraceMasks>523</TraceMasks> <!-- Security, ServiceResultExceptions, Errors, and Trace --> <TraceMasks>519</TraceMasks> <!-- Security, COM Calls, Errors, and Trace --> <TraceMasks>771</TraceMasks> <!-- All Events (Development) --> <TraceMasks>1023</TraceMasks>

Environment Variables

Common environment variables in paths:

Variable

Windows

Linux/macOS

%LocalApplicationData%

C:\Users\<user>\AppData\Local

~/.local/share

%CommonApplicationData%

C:\ProgramData

/usr/local/share

%UserProfile%

C:\Users\<user>

~

%TEMP%

C:\Users\<user>\AppData\Local\Temp

/tmp