settable log function in python