-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Log.java
82 lines (63 loc) · 1.89 KB
/
Log.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package me.nallar.tickthreading;
import java.util.logging.Level;
import java.util.logging.Logger;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.world.World;
@SuppressWarnings ("UnusedDeclaration")
public class Log {
private static final Logger LOGGER = Logger.getLogger("TickThreading");
static {
try {
LOGGER.setParent(FMLLog.getLogger());
} catch (NoClassDefFoundError ignored) {
// Ignored, just means we aren't running under minecraft.
}
LOGGER.setLevel(Level.ALL);
LOGGER.setUseParentHandlers(true);
}
public static void severe(String msg) {
LOGGER.severe(msg);
}
public static void warning(String msg) {
LOGGER.warning(msg);
}
public static void info(String msg) {
LOGGER.info(msg);
}
public static void config(String msg) {
LOGGER.config(msg);
}
public static void fine(String msg) {
LOGGER.fine(msg);
}
public static void finer(String msg) {
LOGGER.finer(msg);
}
public static void finest(String msg) {
LOGGER.finest(msg);
}
public static void severe(String msg, Throwable t) {
LOGGER.log(Level.SEVERE, msg, t);
}
public static void warning(String msg, Throwable t) {
LOGGER.log(Level.WARNING, msg, t);
}
public static void info(String msg, Throwable t) {
LOGGER.log(Level.INFO, msg, t);
}
public static void config(String msg, Throwable t) {
LOGGER.log(Level.CONFIG, msg, t);
}
public static void fine(String msg, Throwable t) {
LOGGER.log(Level.FINE, msg, t);
}
public static void finer(String msg, Throwable t) {
LOGGER.log(Level.FINER, msg, t);
}
public static void finest(String msg, Throwable t) {
LOGGER.log(Level.FINEST, msg, t);
}
public static String name(World world) {
return world.getWorldInfo().getWorldName() + "/" + world.provider.getDimensionName() + "/" + world.provider.field_82913_c + (world.isRemote ? "-r" : "");
}
}