I would prefer syntax like: Log.error(message[, err]); Log.info(message); - but then its not done with an Enum? In swift you can do it with an Enum with associated values ...
But I remember this can be done with some interfaces (sealed interfaces)? But the sealed interfaces are not that easy to write like the enums in swift ...