Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Commit

Permalink
1 log优化 2 设置map初始化size (#148)
Browse files Browse the repository at this point in the history
1 log优化   2 设置map初始化size
  • Loading branch information
gnuhpc authored Dec 22, 2019
2 parents 701d43b + 39e768f commit dead5a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public interface Decode {
Map<String, Object> decode(String message);

default Map<String, Object> createDefaultEvent(String message) {
return new HashMap<String, Object>() {
return new HashMap<String, Object>(2) {
{
put("message", message);
put("@timestamp", DateTime.now());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Map<String, Object> decode(final String message) {
try {
event = (HashMap) JSONValue.parseWithException(message);
} catch (Exception e) {
log.debug("failed to json parse message to event", e);
log.warn("failed to json parse message to event", e);
} finally {
if (event == null) {
event = createDefaultEvent(message);
Expand Down

0 comments on commit dead5a9

Please sign in to comment.