-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include log4j2. #162
Include log4j2. #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for the review @hasancelik. EDIT 2: FYI: I have narrowed the issue down to the logger's layout pattern at our default log4j2.properties. The build passes without the layout pattern provided. Let me try some other patterns. appender.console.layout.pattern=%d [%highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=magenta}] [%style{%t{1.}}{cyan}] [%style{%c{1.}}{blue}]: %m%n EDIT: I believe passing properties file is the origin of the problem. Container crashes upon creation:
and removing
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goog job Enes! I really like the new logs!
Added 2 comments.
s390x arch forms a super weird behavior for logging pattern. For instance, I couldn't make it work to print logger names with abbreviations (i.e. So I have 2 suggestions:
@leszko Do you have any further suggestions? WDYT? |
That's all very weird. I'd go with the second option. Because we don't know of anyone even using Hazelcast on s390x, so I'd not adjust anything for that architecture. If it's possible to detect it and use different logging for s390x docker image, then I'd go for that. However, I'm not sure what this |
Not exactly but something like: BASE="%d [%highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=magenta}]"
ARCH=`arch`
if [[ "$ARCH" == "s390x" ]]; then
export LOGGING_FORMAT="$BASE [%style{%t{1.}}{cyan}] [%style{%c{1.}}{blue}]: %m%n"
else
export LOGGING_FORMAT="$BASE[%style{%t{1.}}{cyan}] [%style{%-10c}{blue}]: %m%n"
fi |
I think this is ok. |
@leszko The build is now passing. PTAL. |
Looks good from my end 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* Add log4j2 for logging. * Make log format arch dependent.
Closes #129