-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JBoss Logging and log exceptions when calling the thread context
providers
- Loading branch information
Showing
5 changed files
with
117 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
core/src/main/java/io/smallrye/context/logging/SmallRyeContextPropagationLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.smallrye.context.logging; | ||
|
||
import static org.jboss.logging.Logger.Level.ERROR; | ||
|
||
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; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Kabir Khan</a> | ||
*/ | ||
@MessageLogger(projectCode = "SRCP", length = 5) | ||
public interface SmallRyeContextPropagationLogger extends BasicLogger { | ||
SmallRyeContextPropagationLogger ROOT_LOGGER = Logger.getMessageLogger(SmallRyeContextPropagationLogger.class, | ||
"io.smallrye.context"); | ||
|
||
@LogMessage(level = ERROR) | ||
@Message(id = 1, value = "An error occurred beginning the ThreadContextSnapshot: %s") | ||
void errorBeginningThreadContextSnapshot(String errorMsg); | ||
|
||
@LogMessage(level = ERROR) | ||
@Message(id = 2, value = "An error occurred ending the ThreadContext: %s") | ||
void errorEndingContext(String errorMsg); | ||
|
||
@LogMessage(level = ERROR) | ||
@Message(id = 3, value = "An error occurred getting the ThreadContextSnapshot: %s") | ||
void errorGettingSnapshot(String errorMsg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters