Skip to content
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

[log4j] migrate to log4j2 (#258) #305

Merged
merged 2 commits into from
Jul 7, 2020
Merged

[log4j] migrate to log4j2 (#258) #305

merged 2 commits into from
Jul 7, 2020

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Jun 24, 2020

  • [log4j] migrate to log4j2

  • [travis] fix log4j config file directive

  • [log4j2] support STDERR and STDOUT as ways to refer to log location too

tylerbenson and others added 2 commits June 24, 2020 16:58
Log via slf4j instead of directly to log4j
* [log4j] migrate to log4j2

* [travis] fix log4j config file directive

* [log4j2] support STDERR and STDOUT as ways to refer to log location too
@truthbk truthbk force-pushed the jaime/log4j_agent5 branch from 776565c to 6c24d91 Compare June 24, 2020 21:03
Copy link
Contributor

@prognant prognant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing that !
Except the one question about stdout, it looks good.

} catch (IOException e) {
// Same as above
LOGGER.warn("Unable to replace $value for attribute " + fullAttributeName, e);
if (alias.contains("$value")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

Comment on lines +66 to +67
&& (ConsoleAppender.Target.SYSTEM_ERR.toString().equals(logLocation)
|| SYSTEM_ERR_ALT.equals(logLocation))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we allow SYSTEM_OUT/ SYSTEM_OUT_ALT along with SYSTEM_ERR/ SYSTEM_ERR_ALT?

Copy link
Member Author

@truthbk truthbk Jul 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe.... but this is actually the same on master, most of these changes came in from cherry-pick'd logic. I had to fix a few things, but this is really the same everywhere. I don't oppose doing some follow-up and maybe verifying/fixing a couple of things in the logger logic, but this should be 👍 and consistent with our logging on JMXFetch on most recent versions.

Thanks for the review @prognant 🙇

@truthbk truthbk merged commit 032edaa into agent-v5 Jul 7, 2020
@truthbk truthbk deleted the jaime/log4j_agent5 branch July 7, 2020 16:34
truthbk added a commit that referenced this pull request Aug 13, 2020
truthbk added a commit that referenced this pull request Aug 29, 2020
* Revert "Revert "[pom] log4j: bump to 2.13.2." (#311)"

This reverts commit 3e22553.

* Revert "[pom] log4j: bump to 2.13.2. (#309)"

This reverts commit 951b944.

* Revert "[log4j] migrate to log4j2 (#258) (#305)"

This reverts commit 032edaa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants