We provide a ready-to-use configuration profile that enables full debug logging for VibeTunnel:
Location: apple/logging/VibeTunnel-Logging.mobileconfig
- Double-click
apple/logging/VibeTunnel-Logging.mobileconfig - System Settings will open to the Profiles section
- Click "Install..." and enter your password
- Restart VibeTunnel
- AirDrop or email the profile to your device
- Open Settings → General → VPN & Device Management
- Install the "VibeTunnel Debug Logging" profile
- Restart the VibeTunnel app
# You should now see full details instead of <private>
./scripts/vtlog.sh- macOS: System Settings → Privacy & Security → Profiles → Remove
- iOS: Settings → General → VPN & Device Management → Remove Profile
When viewing VibeTunnel logs using Apple's unified logging system, you'll see <private> instead of actual values:
2025-07-05 08:40:08.062262+0100 VibeTunnel: Failed to connect to <private> after <private> seconds
This makes debugging extremely difficult as you can't see session IDs, URLs, or other important debugging information.
Apple redacts dynamic values in logs by default to protect user privacy:
- Prevents accidental logging of passwords, tokens, or personal information
- Logs can be accessed by other apps with proper entitlements
- Helps apps comply with privacy regulations (GDPR, etc.)
sudo visudoAdd this line at the end of the file (replace yourusername with your actual username):
yourusername ALL=(ALL) NOPASSWD: /usr/bin/log
For example, if your username is steipete:
steipete ALL=(ALL) NOPASSWD: /usr/bin/log
- Press
Escto enter command mode - Type
:wqand press Enter to save and quit - The changes take effect immediately
# This should work without asking for password:
sudo -n log show --last 1s
# Now vtlog.sh with private flag works without password:
./scripts/vtlog.sh -p-
Normal log viewing (redacted):
log show --predicate 'subsystem == "sh.vibetunnel.vibetunnel"' # Shows: Connected to <private>
-
With sudo and --info flag (reveals private data):
sudo log show --predicate 'subsystem == "sh.vibetunnel.vibetunnel"' --info # Shows: Connected to session-123abc
-
vtlog.sh -p flag automatically:
- Adds
sudoto the command - Adds
--infoflag to reveal private data - With our sudoers rule, no password needed!
- Adds
- ✅ Passwordless access to
logcommand only - ✅ Can view all system logs without password
- ✅ Can stream logs in real-time
- ❌ Cannot run other commands with sudo
- ❌ Cannot modify system files
- ❌ Cannot install software
- ❌ Cannot change system settings
- Only grant this permission to trusted developer accounts
- Use the most restrictive rule possible
- Consider removing when not actively debugging
- Never use
NOPASSWD: ALL- always specify exact commands
Edit /etc/pam.d/sudo:
sudo vi /etc/pam.d/sudoAdd this line at the top (after the comment):
auth sufficient pam_tid.so
Now you can use your fingerprint instead of typing password.
Make sudo remember your password longer:
sudo visudoAdd:
Defaults timestamp_timeout=60
This keeps sudo active for 60 minutes after each use.
Mark non-sensitive values as public in your Swift logging:
// Before (will show as <private>):
logger.info("Connected to \(sessionId)")
// After (always visible):
logger.info("Connected to \(sessionId, privacy: .public)")Create a plist file to enable private data logging for VibeTunnel:
# Create the directory if it doesn't exist
sudo mkdir -p /Library/Preferences/Logging/Subsystems
# Create the plist file
sudo tee /Library/Preferences/Logging/Subsystems/sh.vibetunnel.vibetunnel.plist > /dev/null << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Enable-Private-Data</key>
<true/>
</dict>
</plist>
EOF
# Verify it was created
ls -la /Library/Preferences/Logging/Subsystems/sh.vibetunnel.vibetunnel.plistTo remove:
sudo rm /Library/Preferences/Logging/Subsystems/sh.vibetunnel.vibetunnel.plistFor managed environments or multiple subsystems, create a configuration profile:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key>
<string>com.apple.system.logging</string>
<key>PayloadIdentifier</key>
<string>com.example.logging.vibetunnel</string>
<key>PayloadUUID</key>
<string>$(uuidgen)</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>Subsystems</key>
<dict>
<key>sh.vibetunnel.vibetunnel</key>
<dict>
<key>Enable-Private-Data</key>
<true/>
</dict>
</dict>
</dict>
</array>
<key>PayloadIdentifier</key>
<string>com.example.vibetunnel.logging</string>
<key>PayloadUUID</key>
<string>$(uuidgen)</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>Install via System Settings → Profiles.
Note: The old private_data:on flag was removed in macOS Catalina and no longer works.
With passwordless sudo configured, you can now use:
# View all logs with private data visible
./scripts/vtlog.sh -p
# Filter by category with private data
./scripts/vtlog.sh -p -c WebRTCManager
# Follow logs in real-time with private data
./scripts/vtlog.sh -p -f
# Search for errors with private data visible
./scripts/vtlog.sh -p -s "error" -n 1h
# Combine filters
./scripts/vtlog.sh -p -c ServerManager -s "connection" -f- Make sure you saved the sudoers file (
:wqin vi) - Try in a new terminal window
- Run
sudo -kto clear sudo cache, then try again - Verify the line exists:
sudo grep NOPASSWD /etc/sudoers
- Never edit
/etc/sudoersdirectly! - Always use
sudo visudo- it checks syntax before saving - Make sure the line format is exactly:
username ALL=(ALL) NOPASSWD: /usr/bin/log
- Close and reopen your terminal
- Make sure you're using the exact username from
whoami - Check that
/usr/bin/logexists:ls -la /usr/bin/log
- Verify sudo works:
sudo -n log show --last 1s - Check vtlog.sh has execute permissions:
chmod +x scripts/vtlog.sh - Make sure you're using
-pflag:./scripts/vtlog.sh -p
The passwordless sudo configuration for /usr/bin/log is the cleanest solution:
- Works immediately after setup
- No password prompts when debugging
- Limited security risk (only affects log viewing)
- Easy to revert if needed
Combined with vtlog.sh -p, you get a smooth debugging experience without the frustration of <private> tags hiding important information.
ENDOFFILE < /dev/null