reimplement perror on top of logger

using macros to not lose speed _AND_ to automatically set the
`tag` value.