Skip to content

Commit

Permalink
make loggin synchronized between threads
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-szarkowicz committed May 22, 2024
1 parent fe111b7 commit a9a172c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/core/src/temalab/logger/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,43 @@ public void setLogger(Logger newLogger) {
logger = newLogger;
}

public static void d(String label, String message) {
public synchronized static void d(String label, String message) {
logger.debug(
new Label(label, Label.Color.None, Label.Color.None),
message);
}

public static void i(String label, String message) {
public synchronized static void i(String label, String message) {
logger.info(
new Label(label, Label.Color.None, Label.Color.None),
message);
}

public static void w(String label, String message) {
public synchronized static void w(String label, String message) {
logger.warning(
new Label(label, Label.Color.None, Label.Color.None),
message);
}

public static void e(String label, String message) {
public synchronized static void e(String label, String message) {
logger.error(
new Label(label, Label.Color.None, Label.Color.None),
message);
}

public static void d(Label label, String message) {
public synchronized static void d(Label label, String message) {
logger.debug(label, message);
}

public static void i(Label label, String message) {
public synchronized static void i(Label label, String message) {
logger.info(label, message);
}

public static void w(Label label, String message) {
public synchronized static void w(Label label, String message) {
logger.warning(label, message);
}

public static void e(Label label, String message) {
public synchronized static void e(Label label, String message) {
logger.error(label, message);
}
}

0 comments on commit a9a172c

Please sign in to comment.