modified logging pattern