Skip to content

Refactor logging configuration and setup#9911

Merged
mitchellhenke merged 4 commits intomainfrom
mitchellhenke/refactor-logging-config
Jan 12, 2024
Merged

Refactor logging configuration and setup#9911
mitchellhenke merged 4 commits intomainfrom
mitchellhenke/refactor-logging-config

Conversation

@mitchellhenke
Copy link
Contributor

@mitchellhenke mitchellhenke commented Jan 11, 2024

🎫 Ticket

Link to the relevant ticket: https://gitlab.login.gov/lg-people/platform/radia/radialegacy-09.15.23/-/issues/100

🛠 Summary of changes

As part of moving towards doing log rotation, We will be exploring adding additional configuration when instantiating Loggers. This PR makes a few changes to minimize instantiations and have a single point of access for a given file's logger and hopefully help avoid differing configurations going forward.

This includes:

  • Having the IdentityJobLogSubscriber use the ActiveJob logger which has the side benefit of making the class more thread-safe by eliminating the class instance variable
  • Moving the KMS logger into application configuration rather than as a class instance variable and similar benefit as above with thread-safety
  • Moving the events logger into application configuration rather than creating a new instance every time (this may also have minor performance benefits)
  • Eliminating the visit logging which doesn't appear to be used or referenced anywhere (presumably due to server_side_visits being set to false)
  • Using Rails logger for the AWS logger which fixes a bug where the AWS logger would not respect the STDOUT logging configuration
  • Moving all of the log filenames into the constants file so that they are available prior to application boot
  • Removing the reports_logger (which was removed in Stop writing data to reports.log (LG-9415) #8143)

I will be testing this in my sandbox prior to merging, but wanted to open this for review.

@mitchellhenke mitchellhenke requested a review from a team January 11, 2024 20:41
Mitchell Henke and others added 3 commits January 11, 2024 16:06
changelog: Internal, Logging, Refactor logging configuration and setup
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/refactor-logging-config branch from 3853116 to 9a3d059 Compare January 11, 2024 22:06
@mitchellhenke mitchellhenke merged commit 04b5c3b into main Jan 12, 2024
@mitchellhenke mitchellhenke deleted the mitchellhenke/refactor-logging-config branch January 12, 2024 16:46
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