Better logging that uses ASL log levels. Based on work by Mike Weller.