Following Log Files in Real-Time
-----------------------------------
Affected Roles: Administrator, Power Users
Related Digital Watchdog VMS Apps: DW Spectrum
Software Version: DW Spectrum 6.0
Last Edit: March 24, 2025
-----------------------------------
Log Collection
Logs rotate quickly in a server, especially when the log level has been increased to DEBUG or VERBOSE, which can make it difficult to collect the appropriate data in the log files before they are rotated.
To ensure that you see and collect the correct log information, you can follow the log files in real-time using the Windows PowerShell tool or the Ubuntu or macOS Terminal tool. You can save real-time output into a separate file, which can be shared with the support team as needed.
This article will outline how to collect real-time log files using the Windows PowerShell and with the Ubuntu and macOS Terminal tools.
Related Articles
- DW Spectrum – Configuring Log Files with the Desktop Client
- DW Spectrum – Finding Server Logs with File Directory
- DW Spectrum – Modifying Server Logging Level with Web Admin
Instructions for Real-Time Log Monitoring
Instructions for Windows
To follow a log file in real-time:
- Open Windows PowerShell on the server from which you will be collecting logs.
- In Windows PowerShell, navigate to the file directory containing the Digital Watchdog Media Server logs.
In DW Blackjack Servers, this location can be found in:
Log File Directory:
C:\Windows\System32\config\systemprofile\AppData\Local\Digital Watchdog\Digital Watchdog Media Server\log
To navigate to the log file directory, use the command:
Command:
cd <directory path>
For example:
cd ‘C:\Windows\System32\config\systemprofile\AppData\Local\Digital Watchdog\Digital Watchdog Media Server\log’
- Once you are in the correct directory, you can use the “Get-Content” command followed by the name of the log file and the “-Wait” parameter. The “-Wait” parameter tells the application to continuously monitor the log file for new content.
If you want to continuously monitor the log file for new content, use the command:
Command:
Get-Content <log_file.log> -Wait
For example:
Get-Content .\main.log -Wait
- If you want to continuously monitor the log file for new content and save it to a file, use the “Out-File” command.
Command:
Get-Content <log_file.log> -Wait | Out-File <fileName.log>
For Example:
Get-Content .\main.log -Wait | Out-File example.log
- Use the hotkeys CTRL + C to stop the process.
Instructions for Ubuntu and macOS
To follow a log file in real-time:
- Open Terminal on the server from which you will be collecting logs.
- In Terminal, navigate to the file directory containing the Digital Watchdog Media Server logs.
In DW Blackjack Servers, this location can be found in:
Log File Directory:
/opt/digitalwatchdog/mediaserver/var/log
To navigate to the log file directory, use the command:
Command:
cd <directory path>
For example:
cd /opt/digitalwatchdog/mediaserver/var/log
- Once you are in the correct directory, you can use the “less” command followed by the name of the log file.
If you want to continuously monitor the log file for new content, use the command:
Command:
less <log_file.log>
For example:
less main.log
- If you want to continuously monitor the log file for new content and save it to a file, use the command:
Command:
less <log_file.log> > <fileName.log>
For Example:
less main.log > example.log
- Use the hotkeys CTRL + C to stop the process.
For More Information or Technical Support
DW Technical Support: 866.446.3595 (option 4)
https://www.digital-watchdog.com/contact-tech-support/
______________________________________________________________________________
DW Sales: 866.446.3595 [email protected] www.digital-watchdog.com