Is there a better way to make one String to log it and use as exception
message than this?

        final String msg =
                "Asdf asdf asdf qwer={} asdf zxcv={}";
        LOG.error(msg, obj1, obj2);
        final FormattingTuple logMsg =
                MessageFormatter.format(msg, obj1, obj2);
        throw new SomeException(logMsg.getMessage());

It would be useful if the log messages (e.g. error, debug, etc.) returned
the String logged message.  The code above creates the message twice.


_______________________________________________
slf4j-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/slf4j-user

Reply via email to