[slf4j-dev] [Bug 70] " logging a stack trace along with a parameterized string" solution proposal
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Fri Feb 8 15:07:45 CET 2008
http://bugzilla.slf4j.org/show_bug.cgi?id=70
------- Comment #7 from syvalta at yahoo.com 2008-02-08 15:07 -------
(In reply to comment #4)
> Considering that message formatting is just a trick to improve performance,
> there is no real performance loss in writing:
>
> } catch(Exception e) {
> logger.error("Problem saying hello to " + name, e);
> }
>
> instead of
>
> } catch(Exception e) {
> logger.error("Problem saying hello to {}", name, e);
> }
I think its more about writability and readability of the code:
} catch(Exception e) {
log.error("No row with id '{}' found", e, id);
}
} catch(Exception e) {
log.error("No row with id '" + id + "' found", e, id);
}
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the slf4j-dev
mailing list