Skip to content

Commit eff8839

Browse files
author
kaleidox
committed
less debug clutter without debug mode
1 parent b5ef170 commit eff8839

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/comroid/api/text/Translation.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import lombok.SneakyThrows;
44
import lombok.Value;
5+
import org.comroid.api.func.util.Debug;
56
import org.comroid.api.info.Log;
67
import org.jetbrains.annotations.NotNull;
78
import org.jetbrains.annotations.Nullable;
@@ -45,7 +46,8 @@ public static String str(@NotNull String key, @Nullable String fallback) {
4546
try {
4647
return get(Locale.getDefault()).get(key, fallback);
4748
} catch (MissingResourceException e) {
48-
Log.at(Level.FINE, "Unable to translate key: " + key, e);
49+
if (Debug.isDebug()) Log.at(Level.FINE, "Unable to translate key: " + key, e);
50+
else Log.at(Level.FINE, "Unable to translate key: " + key);
4951
return fallback;
5052
}
5153
}

0 commit comments

Comments
 (0)