Skip to content

Add custom Log4j2 ConfigurationFactory that allows Composite Log4j configuration - #988

Merged
Sigmonia merged 10 commits into
developfrom
fb_compositeLog4j
Mar 13, 2025
Merged

Sigmonia merged 10 commits into
developfrom
fb_compositeLog4j

Conversation

@Sigmonia

@Sigmonia Sigmonia commented Feb 12, 2025 •

Copy link
Copy Markdown
Contributor

Rationale

We need to consolidate our Log4j2.xml configs so that we can more easily update them

Related Pull Requests

Changes

  • Add custom log4j2 ConfigurationFactory class
  • update build.gradle files
  • Update ClassLoaders
  • Update application.properties files

@github-actions

Copy link
Copy Markdown
Contributor

WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive.

@Sigmonia Sigmonia changed the title Fb composite log4j Add custom Log4j2 ConfigurationFactory that allows Composite Log4j configuration Feb 12, 2025
@labkey-willm

Copy link
Copy Markdown
Contributor

does this result in 2 primary log4js that we need to keep in sync? server/embedded/src/main/resources/configs/00.log4j2.xml and server/embedded/src/main/resources/log4j2.xml ?

will these changes also impact what we're doing with chef? ( https://github.com/LabKey/syseng-chef-server/blob/develop/cookbooks/lk_appserver/templates/default/log4j2_tc10.xml.erb )

@Sigmonia
Sigmonia force-pushed the fb_compositeLog4j branch 3 times, most recently from 482b9b2 to a7c72d4 Compare February 21, 2025 18:53
@Sigmonia
Sigmonia force-pushed the fb_compositeLog4j branch 2 times, most recently from b57bb23 to baf1277 Compare March 5, 2025 19:04
@Sigmonia Sigmonia self-assigned this Mar 6, 2025
@Sigmonia
Sigmonia force-pushed the fb_compositeLog4j branch from baf1277 to 794c058 Compare March 6, 2025 22:48
@Sigmonia
Sigmonia requested a review from labkey-stuartm March 6, 2025 22:53
@Sigmonia

Sigmonia commented Mar 6, 2025

Copy link
Copy Markdown
Contributor Author

Log configuration changes moved to the Dockerfile repo.

@labkey-willm labkey-willm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks fine except for the added level bits, which shouldn't be necessary.

<Logger name="org.apache.jasper" level="warn"/>

<Logger name="org.labkey" />
<Logger name="org.labkey" level="info" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the <Root level="info"> above should make this (and the other two you added) moot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These were causing issues/errors when using the ConfigurationFactory, they don't seem to be doing so now. So I removed them.

@Sigmonia
Sigmonia requested a review from labkey-willm March 11, 2025 23:45
@Sigmonia
Sigmonia merged commit e179d46 into develop Mar 13, 2025
@Sigmonia
Sigmonia deleted the fb_compositeLog4j branch March 13, 2025 21:05
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.

2 participants