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

Update test log4j.properties files to log4j2-test.properties files #1529

Closed
ctubbsii opened this issue Feb 21, 2020 · 0 comments · Fixed by #1528
Closed

Update test log4j.properties files to log4j2-test.properties files #1529

ctubbsii opened this issue Feb 21, 2020 · 0 comments · Fixed by #1528
Assignees
Milestone

Comments

@ctubbsii
Copy link
Member

Throughout our code, we have multiple src/test/resources/log4j.properties files.

It's not clear to me how many, if any, of these are still needed for our tests, since we tend to redirect test output to a file anyway.

For any that we need to keep, they should be migrated to use log4j2-test.properties instead.

Perhaps the most important one is the one for our integration tests, which is currently located at test/src/main/resources/log4j.properties

(This issue depends on #1528 being merged and is a follow-on task from that.)

@ctubbsii ctubbsii added help wanted This issue is looking for somebody to work on it. good first issue Well written issue that is very specific and easy to do, intended for first time contributors. and removed good first issue Well written issue that is very specific and easy to do, intended for first time contributors. help wanted This issue is looking for somebody to work on it. labels Feb 21, 2020
@ctubbsii ctubbsii self-assigned this Feb 22, 2020
@ctubbsii ctubbsii linked a pull request Feb 22, 2020 that will close this issue
ctubbsii added a commit to ctubbsii/accumulo that referenced this issue Feb 22, 2020
Fix AuditMessageIT and directly convert existing log4j 1.2 configuration
files to log4j2 format. No evaluation was done to update the files, only
direct conversion from previous behavior.
ctubbsii added a commit that referenced this issue Feb 24, 2020
Fix #1514 Update pom.xml with log4j2 dependencies

* Use slf4j bindings for log4j2
* Keep log4j 1.2 jars for minicluster and test, because ZK needs it at runtime
* Use log4j-1.2-api jar for log4j 1.2 dependencies for deprecated public
  APIs that can't yet be removed (particularly in core/mapred stuffs)
* Add disruptor jar to class path to support high-performance asynchronous loggers
* Exclude transitive dependencies for log4j 1.2, for better control over
  build class path, and to avoid multiple runtime slf4j bindings
* Update assembly to include log4j2 jars, and to exclude log4j 1.2 jars

Fix #1515 Create new AccumuloMonitorAppender to send to REST endpoint

* Remove unnecessary extra port configuration property for log4j
  SocketServer endpoint in monitor
* Update Monitor to store HTTP(s) URL for the service in ZK instead of
  just host and port; remove redundant log4j service advertisement using
  old log4j SocketServer port
* Create new AccumuloMonitorAppender to read HTTP(s) URL from ZooCache,
  on demand, and send logs as JSON to the REST endpoint at that URL
* Fix extra slash in MonitorUtilTest
* Replace previous LogService in monitor with simpler RecentLogs
  implementation to cache received logs from REST endpoint
* Simplify LogResource REST endpoints to use the RecentLogs APIs, with
  new endpoint to receive POSTed logs as JSON, and clean up the
  deduplication/counting/sanitizing code
* Simplify StatusResource to get its info from the RecentLogs object
* Update the web views to include logger names on the monitor page, and
  to simplify passing of the optional stacktrace details

Fix #1516 Remove log4j1 config files and add log4j2 config files

* Create basic log4j2 config files for Accumulo services and a default
  config file for clients such as the shell
* Update accumulo-env.sh to configure logging using high-performance
  asynchronous loggers
* Create service config file with console, rolling file, and monitor
  appenders, as well as an example separate rolling file appender for
  audit logs that can be easily toggled on
* Create config file for console suitable for clients, especially the
  shell, complete with color highlighting
* Add config for periodic auto-reconfiguring of log4j without restarting
  services (especially helpful as a substitute for the now defunct shell
  option for 'debug on')

* Fix ITs and make log clearing use a dedicated endpoint

Fix #1529 Migrate log4j 1.2 test files to log4j2

* Fix AuditMessageIT and directly convert existing log4j 1.2 configuration
  files to log4j2 format. No evaluation was done to update the files, only
  direct conversion from previous behavior.
@ctubbsii ctubbsii added this to the 2.1.0 milestone Jul 12, 2024
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 a pull request may close this issue.

1 participant