Configuring the destination for log output (Connect 2024)
Available parameters
All executables of all Connect editions support the following parameters to control log output:
Parameter | Description |
---|---|
logging | Controls the task of logging information. It is possible to specify multiple values separated by comma or semicolon. Currently the following values are supported: console (or c): Output to the console debug (or d): Output to a debug listener eventlog (or e): Output to the Windows event log (only under Windows) file (or f): Output to a file If this parameter is not specified, logging is done with the mode "console,debug". If the Connect application runs as a Windows service, the mode "console,debug,eventlog" is used. |
loghost | Only when logging to the Windows event log: If the output is to be to the event log of another host, the name of the desired host can be specified here. Please note that the user running the Connect Launcher must have the appropriate rights to write to the event log of this host. |
logname | Only when logging to the Windows event log: If the output is not to be in the "Application" log, the desired log name can be specified here. The string {ProcessName} is automatically replaced by the name of the logging process. |
logsource | Only when logging to the Windows event log: If a source other than ".NET Runtime" is to be used for output, the desired source name can be specified here. The string {ProcessName} is automatically replaced by the name of the logging process. |
logdir | Only when logging to a file: This parameter specifies the directory where the log files are created. If a fully qualified file name for the log is specified by means of the logfile parameter, the logdir parameter is ignored. It is recommended to always specify this parameter if logging to a file is desired. Otherwise, log files could be written to the program directory if the appropriate permission exists. |
logfile | Only when logging to a file: This parameter specifies the name of the generated log file. If it is a fully qualified file name, the logdir parameter is ignored. If this parameter is not specified, a name is generated from the process name and the UTC timestamp. |
Examples
Start of a Connect Server (platform: "windows-x64") under Windows with log output to the console and to the event log:
Start of a Connect Server (platform: "portable") under Windows with log output to a separate event log named "Connect". The process name is used as the event source. Please note that the corresponding process needs administrator permissions to create the event log as well as the event sources. Alternatively, the event log and event sources can be created manually beforehand using the New-EventLog PowerShell command. Note that to use the portable version, the latest version of .NET 6 must be installed.
Start of a Connect Server (platform: linux-x64) under Linux with log output to a file in the directory /home/connect/log. The file name of the log is generated from the process name and the UTC timestamp. If a port <1024 is to be used, the start may have to be done with administrator rights (sudo).
Start a Connect Server (platform: "portable") on Linux with log output to the console. Note that for the use of the portable version the current version of .NET 6 must be installed. If a port <1024 is to be used here, the start may have to be performed with administrator rights (sudo).