Log Collection

Overview

By deafult, the log collection is enabled after you install Citrix VDA for macOS.

Configuration

The configuration package includes the ctxlogd daemon and the setlog utility.

By default, the ctxlogd daemon starts after you install and configure the VDA.

The ctxlogd daemon

All the other services that are traced depend on the ctxlogd daemon.

Note: You can stop the ctxlogd daemon if you do not want to trace the VDA for macOS.

The setlog utility

Log collection is configured using the setlog utility, which is under the /opt/Citrix/VDA/bin/ path and only the root user has the privilege to run it.

You can use the GUI (by simply running a command /opt/Citrix/VDA/bin/setlog, the GUI is available for usage) or run commands to view and change the configurations.

Run the following command for help with the setlog` utility:

`setlog help`
<!--NeedCopy-->

Values

By default,

  • Log Output Path is set to /var/log/xdl/hdx.log
  • Max Log Size is set to 200 MB

and you can save up to two old log files under Log Output Path.

View the current setlog values:

setlog values

log_path (Log Output Path) = /var/log/xdl/hdx.log

log_size (Max Log Size (MiB)) = 200

log_count (Max Old Log Files) = 2
<!--NeedCopy-->

View or set a single setlog value:

setlog value <name> [<value>]
<!--NeedCopy-->

For example:

setlog value log_size 100
<!--NeedCopy-->

Levels

By default, log levels are set to warning (case-insensitive).

  • To view log levels set for different components, run the following command:

     setlog levels
     <!--NeedCopy-->
    
  • To set log levels (including Disabled, Inherited, Verbose, Information, Warnings, Errors, and Fatal Errors), run the following command:

     setlog level <class> [<level>]
     <!--NeedCopy-->
    
    Log Level Command Parameter (Case-Insensitive)
    Disabled none
    Inherited inherit
    Verbose verbose
    Information info
    Warnings warning
    Errors error
    Fatal Errors fatal
    Trace trace

You can also use the GUI applet to change logging levels.

For example, follow the steps to disable all logs.

  1. Click Set All Disabled on the top right.

  2. Click Apply Changes to make the change.

    Set log

The <class> variable specifies one component within the VDA. To cover all components, set it to all. For example:

setlog level all error
<!--NeedCopy-->

Flags

By default, the flags are set as follows:

setlog flags

DATE = true

TIME = true

NAME = true

PID = true

TID = true

SID = true

UID = false

GID = false

CLASS = true

LEVEL = true

FUNC = false

FILE = false

TNAME = false
<!--NeedCopy-->
  • View the current flags:

     setlog flags
     <!--NeedCopy-->
    
  • View or set a single log flag:

     setlog flag <flag> [<state>]
     <!--NeedCopy-->
    

Restore Defaults

Revert all levels, flags, and values to the default settings:

setlog default
<!--NeedCopy-->

Important:

The ctxlogd service is configured using the /var/xdl/.ctxlog file, which only the root users can create.

Recommended:

Do not give write permission to other users.

Failure to comply, can cause the arbitrary or malicious configuration to ctxlogd, which affects the server performance and the user experience.

Log Collection