The JumpCloud Agent logging level can be set to log more verbose logs if necessary. Debug logs can provide additional information for administrators or JumpCloud support. Remotely changing the logging level of the JumpCloud Agent can be triggered by a JumpCloud Command.
Debug logs contain much more information than the default log level; there’s no need to change log level to a higher verbosity other than for troubleshooting. After setting a system’s agent log level to Debug, it’s best practice to reset the logging level to default.
Setting the Log Level Locally
Linux
Sudo privileges are required for the following commands.
To set Debug level logging and restart the JumpCloud Agent:
echo "DEBUG" | sudo tee /opt/jc/loglevel.cache && sudo service jcagent restart
To disable Debug level logging and restart the JumpCloud Agent:
sudo rm /opt/jc/loglevel.cache && sudo service jcagent restart
Mac
Sudo privileges are required for the following commands.
To set Debug level logging and restart the JumpCloud Agent:
echo "DEBUG" | sudo tee /opt/jc/loglevel.cache && sudo launchctl stop com.jumpcloud.darwin-agent
To disable Debug level logging and restart the JumpCloud Agent:
sudo rm /opt/jc/loglevel.cache && sudo launchctl stop com.jumpcloud.darwin-agent
Windows
Run the following commands from an elevated PowerShell console.
To set Debug level logging:
echo DEBUG | set-content 'C:\Program Files\JumpCloud\loglevel.cache'
Stop-Service -Name jumpcloud-agent -Force
Start-Service -Name jumpcloud-agent
To disable Debug level logging:
echo INFO | set-content 'C:\Program Files\JumpCloud\loglevel.cache'
Stop-Service -Name jumpcloud-agent -Force
Start-Service -Name jumpcloud-agent
Setting the Log Level Remotely
Alternately, the JumpCloud Command Gallery contains scripts to set the logging level of a system’s JumpCloud Agent. After setting a system’s agent log level to Debug, it’s best practice to reset the logging level to default.
Importable commands to set the logging level:
- Linux – Set Agent Log Level to Debug
- Mac – Set Agent Log Level to Debug
- Windows – Set Agent Log Level to Debug
Importable commands to set the logging level back to default:
- Linux – Set Agent Log Level to default setting
- Mac – Set Agent Log Level to default setting
- Windows – Set Agent Log Level to default setting