simplified logger: only one function, with prefix recognition