Add log() method