Fix `TaggedLogging` when `progname` is displayed and optimize it using the severity

`ActiveSupport::TaggedLogging` does not correctly display a message when a formatter is used that outputs `progname`.

When a block is given, it will only be evaluated if the severity is greater than or equal to logger's level.