[
https://issues.apache.org/jira/browse/USERGRID-1243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mike Dunker updated USERGRID-1243:
----------------------------------
Description:
Concatenating strings when logging creates temporary strings that can have a
negative effect on GC. Instead, log4j's string formatting functionality should
be used.
Example:
Replace
logger.info("Invalid property value. name = " + name + ", value = " + value);
with
logger.info("Invalid property value. name = {}, value = {}", name, value);
Also:
1) Standardize on slf4j version 1.7.2, which includes variable argument support.
2) Remove extraneous object creation (for when variable argument support didn't
exist).
3) Change debug statements for element creation/deletion, connections, etc. to
trace.
was:
Concatenating strings when logging creates temporary strings that can have a
negative effect on GC. Instead, log4j's string formatting functionality should
be used.
Example:
Replace
logger.info("Invalid property value. name = " + name + ", value = " + value);
with
logger.info("Invalid property value. name = {}, value = {}", name, value);
> Replace logging string concatenation with formatting
> ----------------------------------------------------
>
> Key: USERGRID-1243
> URL: https://issues.apache.org/jira/browse/USERGRID-1243
> Project: Usergrid
> Issue Type: Story
> Reporter: Mike Dunker
> Assignee: Mike Dunker
>
> Concatenating strings when logging creates temporary strings that can have a
> negative effect on GC. Instead, log4j's string formatting functionality
> should be used.
> Example:
> Replace
> logger.info("Invalid property value. name = " + name + ", value = " + value);
> with
> logger.info("Invalid property value. name = {}, value = {}", name, value);
> Also:
> 1) Standardize on slf4j version 1.7.2, which includes variable argument
> support.
> 2) Remove extraneous object creation (for when variable argument support
> didn't exist).
> 3) Change debug statements for element creation/deletion, connections, etc.
> to trace.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)