18

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

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

  • 1
    @sdmeyers I want to debug launchd itself (know what is doing, if it is crashing, who is requesting which jobs to get started when, what are those jobs doing, are they crashing? are they spamming request to start other jobs that are constantly dying?) – gnzlbg Jan 28 '15 at 16:28
  • 2
    Consider asking this on the launchd developer mailing list; members of the list include the authors of launchd. – Graham Miln Jan 29 '15 at 7:37
  • 1
    it seems that i cannot use examine on the mac, it says that it is only available in the DEVELOPMENT variant :/ – gnzlbg Jan 29 '15 at 9:39
  • 1
    did anyone figure out an answer here? i've just subscribed to the mailing list. – icfantv Jul 31 '15 at 3:11
1

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.

  • Try starting apache with a garbage configuration. On linux it will complain and a detailed error will be in systemctl status httpd. On mac, you seem to be out of luck. With a vague error such as (homebrew.mxcl.httpd24[36144]): Service exited with abnormal code: 1 – Ray Foss Jul 10 '17 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .