StandardOutPath
StandardOutPath is a key used in launchd property lists on macOS to redirect a launched process’s standard output to a file. It is typically used together with StandardErrorPath to separately route standard error. The value of StandardOutPath is an absolute filesystem path to a file where stdout will be written for the lifetime of the job.
When a launchd job starts, its stdout is redirected to the file specified by StandardOutPath. The corresponding
Common practice is to direct logs to files under /var/log or a dedicated log directory, with separate
<string>com.example.daemon</string>
<array><string>/usr/bin/mydaemon</string></array>
<key>StandardOutPath</key><string>/var/log/mydaemon.out</string>
<key>StandardErrorPath</key><string>/var/log/mydaemon.err</string>
StandardInPath, a related key, can similarly redirect standard input. Together, these keys help manage a daemon’s