The current, OS-X version of XAMPP comes with PEAR but it’s not installed/configured.

Here is what you need to do:

sudo su -  [and type admin password]
/Applications/xampp/xamppfiles/lib/php/pear install PEAR
/Applications/xampp/xamppfiles/lib/php/pear install Log
/Applications/xampp/xamppfiles/lib/php/pear list 

The last command outputs the list of installed pear modules. Log should be one of them.

Once you configure pear and install Log plugin, you need to add PEAR to include_path in XAMPP’s php.ini.

Edit /Applications/xampp/etc/php.ini and at the very end of the file note the lines:

1133 ;***** Added by go-pear
1134 include_path=".:/Applications/xampp/xamppfiles/lib/php"
1135 ;*****

change the configuration to read:

include_path = ".:/Applications/xampp/xamppfiles/lib/php

(comment: of course, the entire include_path must be on the same line, we had to break it at semicolon to avoid the long line destroying the page layout).