use BadArgumentError and remove old logger style