Add functions to make it more compatiable with standard log package