We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 615eb93 commit ca9a2a3Copy full SHA for ca9a2a3
log-utils/src/main/java/net/minecraftforge/util/logging/Log.java
@@ -58,8 +58,8 @@ private static PrintStream streamOf(Level level, PrintStream delegate) {
58
private static byte indent = 0;
59
60
/** Pushes the current indentation level up by one. */
61
- public static void push() {
62
- indent++;
+ public static int push() {
+ return ++indent;
63
}
64
65
/**
@@ -72,6 +72,13 @@ public static void pop() {
72
throw new IllegalStateException("Cannot pop logger below 0");
73
74
75
+ public static void setIndent(byte indent) {
76
+ if (indent < 0)
77
+ throw new IllegalStateException("Cannot pop logger below 0");
78
+
79
+ Log.indent = indent;
80
+ }
81
82
static String getIndentation() {
83
if (indent == 0) return "";
84
0 commit comments