Logging in RealVNC Connect v7.14.0 onwards has changed
Please see this section
RealVNC Connect
By default, RealVNC Viewer and RealVNC Server record basic information about connection activity in the system's own logging facility, as well logging application activity to a file.
Default log destinations
The following table lists the default destinations for log output from RealVNC Server and RealVNC Viewer:
RealVNC Server
| Mode | Windows | macOS | Linux |
|---|---|---|---|
| Service Mode |
Event Log, (see note 1) C:\ProgramData\RealVNC-Service\vncserver.log |
syslog /Library/Logs/vncserver.log |
syslog, to the USER facility (see note 2) /var/log/vncserver-x11.log |
| User Mode | %localappdata%\RealVNC\vncserver.log | ~/Library/Logs/vnc/vncserver.log | ~/.vnc/vncserver-x11.log |
| Virtual Mode | N/A | N/A | Standard Error (see note 3) |
| Virtual Mode daemon | N/A | N/A |
syslog, to the DAEMON facility See Virtual Mode above for logging for each created user session. |
RealVNC Viewer
| Windows | macOS | Linux |
|---|---|---|
| %localappdata%\RealVNC\vncviewer.log | ~/Library/Logs/vnc/vncviewer.log | ~/.vnc/vncviewer.log |
The following notes apply to the tables above:
- RealVNC Server and RealVNC Viewer require Windows Event Log Service to be running, and that Event Viewer > Windows Logs > Application > Properties is set to overwrite as needed.
If the service is not running or the event log is full, connections cannot be established. - Using Linux, RealVNC Server running in Service mode. can be configured to log to different facilities using the SyslogFacility parameter.
-
Using Linux, the default destination for RealVNC Server in Virtual Mode is Standard Error (stderr). However, vncserver-virtual automatically redirects this to file at:
~/.vnc/<computer>:<display-number>.log
Please note that the output of the X Server session is also included.
Under Linux and macOS, RealVNC Server also automatically logs connections authenticated using system authentication or single sign-on schemes to the syslog AUTHPRIV facility. This is typically located at /var/log/auth.log and /var/log/secure/log respectively.
Customising logfile name and location
Logging to file is determined by the LogDir and LogFile parameters. For the default filename and directory, please refer to the Default log destinations section above.
For RealVNC Viewer, please note that the destination file and directory must have writable permissions for a standard user account and must not require administrative privileges to view / write to.
Log file rotation
v7.14.0 and later
From RealVNC Viewer/Server 7.14.0 and RealVNC Connect 8.0.0 and later, RealVNC Connect will rotate the log file to a timestamped .log file each time the program is restarted:
*Note: v7.14.0 will save them as vncviewer.log.<timestamp> and vncserver.log.<timestamp>.
How long the logs are stored is dependent on the LogKeepDays parameter in RealVNC Viewer and RealVNC Server respectively; the default is 30 (days).
v7.13.1 and earlier
The destination files contents are overwritten each time the program is restarted, retaining the current instance's logs and 1 previous instance in a .log.bak file.
Generating debug logs
When contacting RealVNC Support, the support team rely on comprehensive debug log files to troubleshoot problems. For more information about how to generate debug logs please see our dedicated article here: How do I generate debug logs in RealVNC Connect?
Recording information about other programs and sub-processes
The Log, LogFile and LogDir parameters can be used to record information about RealVNC Connect programs – excluding RealVNC Viewer and RealVNC Server – along with its sub-processes. This may be useful if RealVNC's Support team requests that you dig deeper into any problems you may encounter.
Windows
You can apply the above parameters to the following programs and sub-processes by creating keys in the Windows Registry or for other programs via the command line.
| Program or sub-process | Registry key | Parameters can be applied... | Registry hive | |
|---|---|---|---|---|
| RealVNC Server | Service Mode user interface | vncserverui-service | Registry | HKEY_CURRENT_USER |
| User Mode user interface | vncserverui-user | |||
| Licensing | At the command line | vnclicense | Registry or command line | |
| Using the Licensing Wizard | vnclicensewiz | |||
For example, to create a log file for the RealVNC Server in Service Mode user interface:
- Using Registry Editor, navigate to
HKEY_CURRENT_USER\Software\RealVNC. - Select New > Key from the shortcut menu, and create
vncserverui-service. - Select New > String Value from the shortcut menu, and create
Log. - Select Modify from the shortcut menu, and specify appropriate Value data, for example
*:file:100.
Repeat steps 3 and 4 for the LogFile and LogDir parameters, if necessary. Restart the program to create the new log file.
To create a log file for a program at the command line, apply parameters before any command, for example:
vnclicense.exe -Log=*:file:100 -LogFile=license.log -add <offline license>
macOS
You can apply the logging parameters to the following programs when run from the command line:
vnclicensevnclicensewiz
Do so before any command, for example:
/Library/vnc/VNC\ Server\ Licensing.app/Contents/MacOS/vnclicensewiz -Log=*:file:100
*Two files are created for the RealVNC Server Licensing Wizard:
~/Library/Logs/vnc/vnclicensewiz.log/Library/Logs/vnclicensewiz_helper.log
macOS Catalina (and later) requires you change the shell to bash before running this command.
Linux
You can apply parameters to the following programs when run from the command line:
vnclicensevnclicensewiz
Do so before any command, for example:
sudo vnclicense -Log=*:file:100 -LogDir=/home/dev/logs -add <offline license>
On-Demand Assist
By default, On-Demand Assist logs application activity to a file.
Default log destinations
Please note, if you have applied custom branding to your On-Demand Assist app the folder and file name will be OnDemandAssistByYourCompanyName instead.
Windows
%localappdata%\OnDemandAssistByRealVNC\OnDemandAssistByRealVNC.log
macOS
~/Library/Logs/OnDemandAssistByRealVNC/OnDemandAssistByRealVNC.log
Linux
~/.OnDemandAssistByRealVNC/OnDemandAssistByRealVNC*.log
Log file rotation
On-Demand Assist rotates the log file to a timestamped .log file each time the program is restarted. Log files will be kept for 30 days.
Generating debug logs
When contacting RealVNC Support, the support team rely on comprehensive debug log files to troubleshoot problems. For more information about how to generate debug logs please see our dedicated article here: How do I generate debug logs in RealVNC Connect?
Comments
Article is closed for comments.