enhance the log function

Hi,

I have improved the nature log function to provide more options for the developer to track the logs.

Cheers,
Kefeng