fix #9: derive log level from enclosing type(s)