Skip to content

Commit

Permalink
Merge pull request #37 from rhusar/logger-fix
Browse files Browse the repository at this point in the history
Logger cleanup.
  • Loading branch information
ehsavoie authored Dec 16, 2024
2 parents df61301 + 905d245 commit 73e2b3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,19 @@

package org.wildfly.extension.ai.injection;

import static org.jboss.logging.Logger.Level.WARN;

import java.lang.invoke.MethodHandles;

import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
import org.jboss.logging.annotations.LogMessage;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;

@MessageLogger(projectCode = "WFAIINJC", length = 5)
public interface AILogger extends BasicLogger {

AILogger ROOT_LOGGER = Logger.getMessageLogger(MethodHandles.lookup(), AILogger.class, "org.wildfly.extension.ai.injection");
/**
* Logs a warning message indicating the address, represented by the {@code address} parameter, could not be
* resolved, so cannot match it to any InetAddress.
*/
@LogMessage(level = WARN)
@Message(id = 1, value = "The deployment does not have Jakarta Dependency Injection enabled.")
void cdiRequired();


@Message(id = 2, value = "The bean name %s is expecting a %s while the llm is configured as streaming %s")
@Message(id = 1, value = "The bean name %s is expecting a %s while the llm is configured as streaming %s")
IllegalStateException incorrectLLMConfiguration(String name, String typeClass, boolean streaming);

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static org.jboss.logging.Logger.Level.WARN;

import java.lang.invoke.MethodHandles;

import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
Expand All @@ -17,9 +18,6 @@
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;

/**
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
*/
@MessageLogger(projectCode = "WFAI", length = 5)
public interface AILogger extends BasicLogger {

Expand Down

0 comments on commit 73e2b3b

Please sign in to comment.