logging function can be overridden now