61

Does homebrew keep logs, and if so where?

I did a brew update which broke python support in macvim, and now I can't even get macvim to build. I'm hoping that there are some clues in the log.

Dean
  • 847
  • 2
  • 8
  • 11

4 Answers4

56

~/Library/Logs/Homebrew/

Homebrew creates log files in your Library folder at: ~/Library/Logs/Homebrew/

You can view the log files by holding down Option and using the Finder menu item: Go > Library, then navigating to Logs > Homebrew.

Alternatively, you can use the Console.app application to browse to the log files.

Homebrew History

The default creation of individual log files was added during 2013 to Homebrew.

Homebrew issue #10430 talks about logging and build errors. The issue report mentions no log file is kept but explains that a log can be created with the command format:

brew install <formula> 2>&1 | tee install.log
Graham Miln
  • 41,742
  • 8
  • 87
  • 120
11

Logs seem to be in ~/Library/Logs/Homebrew/... They can be viewed either using command line utilities or the Console app.

Danny Levinson
  • 111
  • 1
  • 2
3

This works for the normal brew installs, but nothing is logged to these directories for services (for example, if you install bind, nothing is logged to ~/Library/Logs/Homebrew/bind), possibly because you have to start services via sudo.

lbutlr
  • 1,128
  • 6
  • 14
  • 2
    Would you expect logs for installed packages to be in a sub dir of ~/Library/Logs/Homebrew though? I just looked, and was surprised that 2 packages I've installed do log to there. My first guess would be that packages would log to the "standard" `/var/log` (or since homebrew works using `/usr/local`, maybe `/usr/local/var/log`) – Peter Hanley Mar 22 '18 at 18:47
2

For brew services the logging location is specified in the service's corresponding plist file, using the following tags .e.g.

<key>StandardErrorPath</key>
<string>/usr/local/var/log/that_service.log</string>
<key>StandardOutPath</key>
<string>/usr/local/var/log/that_service.log</string>

The location of plist files for active services may be obtained by running:

brew services list
Pierz
  • 3,239
  • 23
  • 16