Introduction
This document describes how to enable maximum debug logging on the Secure Web Gateway (SWG) module for AnyConnect and Cisco Secure Client (CSC).
Use Cases for Enabling Maximum Debug Logging
Enable maximum debug logging on the SWG module when troubleshooting issues such as:
- Hotspot problems via Captive Portal
- External Domain Bypass List not applying
- Intermittent DNS or web performance issues
Enable Maximum Debug Logging on AnyConnect 4.10 MR7, CSC 5.0 MR2, or Older
If you use AnyConnect 4.10 MR7, CSC 5.0 MR2, or an older version, perform these steps. By default, maximum debug logging is not enabled, and configuration is not possible via the Umbrella dashboard or ASA. You must manually add "logLevel": "1"
to the orgConfig
object in the SWGConfig.json
file. If you are using latest version of AnyConnect or Cisco Secure Client, please skip this section.
Location of SWGConfig.json
- Windows (AnyConnect):
C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Umbrella\SWG\
- Windows (Secure Client):
C:\ProgramData\Cisco\Cisco Secure Client\Umbrella\SWG\
- macOS (AnyConnect):
/opt/cisco/anyconnect/umbrella/swg/
- macOS (Secure Client):
/opt/cisco/secureclient/umbrella/swg/
Make Debug Logging Persistent
The modified SWGConfig.json
file remains only until the next API sync by the Cisco AnyConnect Umbrella module. To persist this configuration and prevent it from being overwritten by API sync, deploy a swg_org_config.flag
file in the Umbrella/data
folder.
-
Create the Flag File
-
Create a new file named swg_org_config.flag
in the Umbrella Data folder. The file extension must be .flag
.
-
Windows (AnyConnect):
-
C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Umbrella\data\swg_org_config.flag
-
Windows (Secure Client):
-
C:\ProgramData\Cisco\Cisco Secure Client\Umbrella\data\swg_org_config.flag
-
macOS (AnyConnect):
-
/opt/cisco/anyconnect/umbrella/data/swg_org_config.flag
-
macOS (Secure Client):
-
/opt/cisco/secureclient/umbrella/data/swg_org_config.flag
-
Copy and Modify Content
-
Copy the contents of the orgConfig
object from the SWGConfig.json
file to the swg_org_config.flag
file.
-
Append with "logLevel": "1"
.
-
For example:
-
Ensure the flag file starts with { "exceptionList": [...]
and ends with "SWGEchoService": "http://www.msftconecttest.com/connecttest.txt"}
.
-
Avoid copying extra lines before or after the object.
-
Incorrectly copying lines such as identity
, deviceId
, or adUserID
can break SWG functionality.
Incorrect Example: The flag file contains keys like identity
, deviceId
, or dUserID
prior to the { "exceptionList":
Correct Example: The flag file starts with { "exceptionList":
14970100184724
-
Restart Service
- Restart the Cisco AnyConnect Secure Mobility Agent/Secure Client service, reboot the machine, or connect and disconnect the VPN.
-
Verify Configuration
Verification and Providing Maximum Debug Logs
Windows Verification
-
Open Windows Event Viewer.
- Look for log lines similar to these examples. This indicates Max Debug logging has been enabled successfully.
Example 1:
-
Use the PowerShell command to convert max debug event logs (.evtx) into txt:
macOS Verification
On Mac OSX, the debug logging can be viewed with this command (you can grep or write them in txt).
-
Run the command:
-
The AnyConnect DART Bundle includes Maximum Debug logs. After verifying enablement, recreate the issue, record the timestamp, user experience, and domain in question, and provide this information along with the DART Bundle to support.
Additional Notes
- Maximum debug logging generates verbose logs. Configure the Umbrella Roaming Security Module log size in Windows Event Viewer to accommodate large logs, especially for intermittent issues.
360056784112
- Remove or rename the
swg_org_config.flag
file to disable Max Debug logging when troubleshooting is complete.
Enable Maximum Debug Logging on CSC 5.0 MR3 and AC 4.10 MR8 or Later
Overview
Starting with CSC 5.0 MR3 and AC 4.10 MR8, debug logging enablement uses a simpler process.
Changes
- Copy the
SWGConfigOverride.json
file (with static content) to the SWG folder to enable debug logging.
- No need to copy or modify the
orgConfig
from SWGConfig.json
. The contents of this file won’t change org to org.
- No dependency on the DNS module to perform config sync or read from the flag file. The
SWGConfig.json
file remains untouched.
Enable Debug Logging
The config value in SWGConfigOverride.json
takes precedence over the value (if present) in SWGConfig.json
. The SWGConfigOverride.json
can contain and override only two configs – logLevel (to enable/disable debug logging) and autotuning ( to enable/disable send buffer autotuning).
-
To enable debug logging, copy SWGConfigOverride.json
with the content:
-
Place SWGConfigOverride.json
in the SWG folder:
- Windows (AnyConnect):
C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Umbrella\SWG\
- Windows (Secure Client):
C:\ProgramData\Cisco\Cisco Secure Client\Umbrella\SWG\
- macOS (AnyConnect):
/opt/cisco/anyconnect/umbrella/swg/
- macOS (Secure Client):
/opt/cisco/secureclient/umbrella/swg/
-
Restart the SWG or Umbrella service, or restart the system.
- macOS: Stop and start the AnyConnect or Secure Client agent.
- Windows: Restart or stop/start the Secure Web Gateway (acswgagent in 4.10.x builds /csc_swgagent in 5.x builds) service via the Services MMC snap-in (Start > Run > Services.msc).
Note: The older method of enabling debug logging is still supported and can still be followed and is the only option for clients older than 5.0 MR3 or 4.10 MR8.
Configuration and Operational Notes
- The
SWGConfig.json
file is case sensitive. Use "logLevel": "1"
with double quotes.
- The
logLevel
value is a string 1, not an integer, therefore it has to be "1" with double quotes.
- The
swg_org_config.flag
file must have a .flag
extension, not .txt
.
- The max debug logging generates extremely detailed logs. Enable maximum debug logging only if requested by an Umbrella Support engineer.
- The
swg_org_config.flag
file contains a static list of bypassed domains and does not sync with External Domains listed in Dashboard > Deployments > Domain Management.