I will look into it in more details soon, summer holidays kept me out of the office quite a lot. It would be good to find a way to have a single framework that works for all logging related modules, like `log_custom` or `log_systemd` (maybe these modules can be adapted to the way proposed by this patch, if it offers more flexibility that the existing one).