Logging mixin with unified interface at class and instance layers