MacOS – Set launchd log level

launchdmacos

How can I set the log level of launchd in MacOS Yosemite?

I've tried launchctl log level debug but it doesn't work.

Best Answer

Since Apple publishes the source code for launchd, you might have better luck just attaching a debugger to the process to inspect or set breakpoints.

That and changing the log level might also be overkill. You can inspect the loaded jobs quite easily and disable them / change them to call debugging scripts or even set another job to dump status or log messages when another process starts or stops.

I'd be interested in more specifics of what you are doing - this seems like a great example of an XY problem. You're asking about the solution you see as the best way forward and not about what the actual problem / issue is.