blob: 3ec36aeec13fe7daf42b44221f712a3c9424b4b4 (
plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
package gtPlusPlus.api.objects;
import org.apache.logging.log4j.LogManager;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
import gregtech.asm.GTCorePlugin;
import gtPlusPlus.core.config.ASMConfiguration;
import gtPlusPlus.core.config.Configuration;
public class Logger {
public Logger() {}
// Logging Functions
public static final org.apache.logging.log4j.Logger modLogger = Logger.makeLogger();
// Generate GT++ Logger
public static org.apache.logging.log4j.Logger makeLogger() {
return LogManager.getLogger("GT++");
}
private static final boolean enabled = !ASMConfiguration.debug.disableAllLogging;
public static org.apache.logging.log4j.Logger getLogger() {
return modLogger;
}
// Non-Dev Comments
public static void INFO(final String s) {
if (enabled) {
modLogger.info(s);
}
}
// Non-Dev Comments
public static void MACHINE_INFO(String s, Object... args) {
if (enabled) {
if (Configuration.debug.MachineInfo || GTCorePlugin.isDevEnv()) {
modLogger.info("Machine Info: " + s + " ", args);
}
}
}
// Developer Comments
public static void WARNING(final String s) {
if (enabled) {
if (ASMConfiguration.debug.debugMode) {
modLogger.warn(s);
}
}
}
// Errors
public static void ERROR(final String s) {
if (enabled) {
if (ASMConfiguration.debug.debugMode) {
modLogger.fatal(s);
}
}
}
// Developer Logger
public static void SPECIFIC_WARNING(final String whatToLog, final String msg, final int line) {
if (enabled) {
// if (!CORE_Preloader.DEBUG_MODE){
FMLLog.warning("GT++ |" + line + "| " + whatToLog + " | " + msg);
// }
}
}
// ASM Comments
public static void LOG_ASM(final String s) {
if (enabled) {
FMLRelaunchLog.info("[Special ASM Logging] ", s);
}
}
/**
* Special Loggers
*/
/**
* Special Logger for Bee related content
*/
public static void BEES(final String s) {
modLogger.info("[Bees] " + s);
}
/**
* Special Logger for Debugging Bee related content
*/
public static void DEBUG_BEES(final String s) {
if (enabled) {
if (GTCorePlugin.isDevEnv() || ASMConfiguration.debug.debugMode) {
modLogger.info("[Debug][Bees] " + s);
}
}
}
/**
* Special Logger for Materials related content
*/
public static void MATERIALS(final String s) {
if (enabled) {
if (GTCorePlugin.isDevEnv() || ASMConfiguration.debug.debugMode) {
modLogger.info("[Materials] " + s);
}
}
}
/**
* Special Logger for Debugging Materials related content
*/
public static void DEBUG_MATERIALS(final String s) {
if (enabled) {
if (GTCorePlugin.isDevEnv() || ASMConfiguration.debug.debugMode) {
modLogger.info("[Debug][Materials] " + s);
}
}
}
/**
* Special Logger for Reflection related content
*/
public static void REFLECTION(final String s) {
if (enabled) {
if (GTCorePlugin.isDevEnv() || ASMConfiguration.debug.debugMode) {
modLogger.info("[Reflection] " + s);
}
}
}
/**
* Special Logger for Darkworld related content
*/
public static void WORLD(final String s) {
if (enabled) {
if (GTCorePlugin.isDevEnv() || ASMConfiguration.debug.debugMode) {
modLogger.info("[WorldGen] " + s);
}
}
}
public static void RECIPE(String string) {
if (enabled) {
if (
/* GTCorePlugin.isDevEnv() || */ ASMConfiguration.debug.debugMode) {
modLogger.info("[Recipe] " + string);
}
}
}
public static void SPACE(final String s) {
if (enabled) {
modLogger.info("[Space] " + s);
}
}
}
|