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

Use module-friendly logger methods #1253

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.smallrye.config._private;

import java.lang.invoke.MethodHandles;

import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
import org.jboss.logging.annotations.Cause;
Expand All @@ -9,7 +11,7 @@

@MessageLogger(projectCode = "SRCFG", length = 5)
public interface ConfigLogging extends BasicLogger {
ConfigLogging log = Logger.getMessageLogger(ConfigLogging.class, "io.smallrye.config");
ConfigLogging log = Logger.getMessageLogger(MethodHandles.lookup(), ConfigLogging.class, "io.smallrye.config");

@LogMessage(level = Logger.Level.WARN)
@Message(id = 1000, value = "Unable to get context classloader instance")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.smallrye.config.source.file;

import java.lang.invoke.MethodHandles;

import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
import org.jboss.logging.annotations.LogMessage;
Expand All @@ -8,7 +10,8 @@

@MessageLogger(projectCode = "SRCFG", length = 5)
interface FileSystemLogging extends BasicLogger {
FileSystemLogging log = Logger.getMessageLogger(FileSystemLogging.class, FileSystemLogging.class.getPackage().getName());
FileSystemLogging log = Logger.getMessageLogger(MethodHandles.lookup(), FileSystemLogging.class,
FileSystemLogging.class.getPackage().getName());

@LogMessage(level = Logger.Level.WARN)
@Message(id = 3000, value = "Unable to read content from file %s. Exception: %s")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.smallrye.config.source.zookeeper;

import java.lang.invoke.MethodHandles;

import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
import org.jboss.logging.annotations.Cause;
Expand All @@ -9,7 +11,8 @@

@MessageLogger(projectCode = "SRCFG", length = 5)
interface ZooKeepperLogging extends BasicLogger {
ZooKeepperLogging log = Logger.getMessageLogger(ZooKeepperLogging.class, ZooKeepperLogging.class.getPackage().getName());
ZooKeepperLogging log = Logger.getMessageLogger(MethodHandles.lookup(), ZooKeepperLogging.class,
ZooKeepperLogging.class.getPackage().getName());

@LogMessage(level = Logger.Level.WARN)
@Message(id = 4500, value = "Failed to retrieve property names from ZooKeeperConfigSource")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.smallrye.config.events.regex;

import java.lang.invoke.MethodHandles;

import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
import org.jboss.logging.annotations.LogMessage;
Expand All @@ -8,7 +10,8 @@

@MessageLogger(projectCode = "SRCFG", length = 5)
interface RegexLogging extends BasicLogger {
RegexLogging log = Logger.getMessageLogger(RegexLogging.class, RegexLogging.class.getPackage().getName());
RegexLogging log = Logger.getMessageLogger(MethodHandles.lookup(), RegexLogging.class,
RegexLogging.class.getPackage().getName());

@LogMessage(level = Logger.Level.WARN)
@Message(id = 5000, value = "Can not find ChangeEvent parameter for method %s. @RegexFilter is being ignored")
Expand Down