console logging pattern