Logs - App-Auto-Patch/App-Auto-Patch GitHub Wiki

App Auto-Patch generates logs while running to help identify what happened during each run, which can aid troubleshooting.

There are two log streams:

Main Log

The main log is stored in the logs folder within the AAP install folder
Default: /Library/Management/AppAutoPatch/logs/aap.log

Standard Logging

A standard set of logging gets stored in the main log which contains information about what takes place during each run

As of 3.7.3, the console-user status lines are written here. Earlier builds checked a log-folder variable that is never set, so a root run printed them to the terminal and left the console user's account details out of the verbose log.

As of 3.7.1, each line starts with a fixed YYYY-MM-DD HH:MM:SS timestamp. Earlier builds used a weekday and month abbreviation, which followed the process locale, so the same log could mix German (Mi. Sep. 16) and English (Wed Sep 16) when one run was a LaunchDaemon and another was started from Terminal.

As of 3.7.0, verbose entries are never written to the main log. This keeps aap.log focused on ordinary workflow status even when Verbose Mode is enabled.

Versions recorded at install (Version 3.7.5)

As of 3.7.5, a silent background patch and a normal install each record the installed version and the version being installed:

[INFO] Silent background patch attempt for lowprofile: old version 1.2.0, new version 1.3.0
[INFO] Installing lowprofile: old version 1.2.0, new version 1.3.0

The staged-installer line uses the same version text. The installed version comes from discovery. The version being installed comes from discovery, or from the staged .version file when discovery was skipped. A value that was not found is logged as unknown.

Verbose Mode (Version 3.7+)

Default: /Library/Management/AppAutoPatch/logs/aap_verbose.log

aap_verbose.log is written only when VerboseMode is enabled. When enabled, it contains the complete transcript: regular workflow messages plus detailed [VERBOSE] entries. When disabled, AAP performs no writes to this file.

Enable or disable it with:

sudo appautopatch --verbose-mode
sudo appautopatch --verbose-mode-off

Or use the VerboseMode managed preference.

Version 3.7 also:

  • Prevents duplicate verbose entries
  • Tags lines with the AAP script name rather than an internal logging function
  • Caches host/script identity and reuses open log file descriptors
  • Removes high-frequency per-tick swiftDialog update logging

As of 3.7.5, each verbose run is kept on its own. aap_verbose.log holds only the current run. At the start of the next verbose run, the previous file is copied to /Library/Management/AppAutoPatch/logs-verbose-archive/aap_verbose_YYYY-MM-DD-HHMMSS.log. The time is when that previous run last wrote. VerboseMode off leaves aap_verbose.log untouched.

logs-verbose-archive keeps 10 files. When a run leaves more than 10, the oldest file is deleted. A folder that already has more than 11 files comes down by one file each run.

The size rotation from 3.6.0 remains: once aap_verbose.log exceeds appAutoPatchVerboseLogArchiveSize (default 10,000 KB), that file can also be moved into logs-verbose-archive.

Because verbose output is no longer captured when Verbose Mode is off, enable it before reproducing an issue that requires detailed diagnostics.