log: add API to check if a logtype can log in a given level