Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzerntev committed Nov 13, 2024
1 parent fed6c69 commit 1fa38a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/rawlabs/utils/core/WithRawLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.slf4j.LoggerFactory;

public abstract class WithRawLogger {
private final Logger logger;
public final Logger logger;
private final RawLoggingContext loggingContext = buildLoggingContext();

private WithRawLogger(Class<?> clazz) {
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/com/rawlabs/utils/core/RawLogging.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ trait RawLogging extends StrictLogging {

def buildLoggingContext(): RawLoggingContext

// Method equivalent to withLoggingContext(Runnable block)
def withLoggingContext(block: () => Unit): Unit = {
loggingContext.withLoggingContext((() => block()): Runnable)
}

// Method equivalent to <T> void withLoggingContext(Supplier<T> block)
def withLoggingContextAndResult[T](block: () => T): Unit = {
loggingContext.withLoggingContext((() => block()): Supplier[T])
}
Expand Down

0 comments on commit 1fa38a4

Please sign in to comment.