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

Loggers initialized with foreign classes #12127

Closed
timveil opened this issue Dec 8, 2023 · 0 comments · Fixed by #12128
Closed

Loggers initialized with foreign classes #12127

timveil opened this issue Dec 8, 2023 · 0 comments · Fixed by #12128
Labels

Comments

@timveil
Copy link
Contributor

timveil commented Dec 8, 2023

I found a number of instances were a Logger class is initialized with a class name other than the class in which it belongs. This is typically unintentional and caused by copying logger initialization from one class to another. Creating this issue to track the PR to correct these instances. Here is a likely example...

public class SpecialValueTransformer implements RecordTransformer {

  private static final Logger LOGGER = LoggerFactory.getLogger(NullValueTransformer.class);
  ...
}

in this instance the LOGGER should have been initialized with SpecialValueTransformer.class instead of NullValueTransformer.class

timveil added a commit to timveil-startree/pinot that referenced this issue Dec 8, 2023
This commit addresses a widespread issue of Logger instances being incorrectly initialized in multiple classes. The Logger instances were mostly being created with the wrong class as argument to the LoggerFactory.getLogger() method. This issue has now been fixed by replacing the incorrect class names with the corresponding class in which the Logger instance is initialized. apache#12127
@walterddr walterddr added the bug label Dec 11, 2023
walterddr pushed a commit that referenced this issue Dec 11, 2023
…n multiple classes (#12128)

* Refactor logger initialization in multiple classes

This commit addresses a widespread issue of Logger instances being incorrectly initialized in multiple classes. The Logger instances were mostly being created with the wrong class as argument to the LoggerFactory.getLogger() method. This issue has now been fixed by replacing the incorrect class names with the corresponding class in which the Logger instance is initialized. #12127
saurabhd336 pushed a commit to saurabhd336/pinot that referenced this issue Feb 9, 2024
…tion in multiple classes (apache#12128)

* Refactor logger initialization in multiple classes

This commit addresses a widespread issue of Logger instances being incorrectly initialized in multiple classes. The Logger instances were mostly being created with the wrong class as argument to the LoggerFactory.getLogger() method. This issue has now been fixed by replacing the incorrect class names with the corresponding class in which the Logger instance is initialized. apache#12127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants