|
6 | 6 | import java.io.OutputStream; |
7 | 7 | import java.util.List; |
8 | 8 | import java.util.ArrayList; |
| 9 | +import java.util.logging.Logger; |
9 | 10 | import java.nio.file.Files; |
10 | 11 | import java.nio.file.StandardCopyOption; |
11 | 12 |
|
|
27 | 28 | import com.dynamo.bob.pipeline.antlr.LuaPreProcBaseListener; |
28 | 29 |
|
29 | 30 | public class LuaPreprocessor implements ILuaPreprocessor { |
| 31 | + private static Logger logger = Logger.getLogger(LuaPreprocessor.class.getName()); |
30 | 32 |
|
31 | | -private static StringBuffer parsedBuffer = null; |
32 | | -private static Boolean hasChanges; |
33 | | -private static String errorMessage; |
34 | | -private static int currentBuildVariant; |
| 33 | + private static StringBuffer parsedBuffer = null; |
| 34 | + private static Boolean hasChanges; |
| 35 | + private static String errorMessage; |
| 36 | + private static int currentBuildVariant; |
35 | 37 |
|
36 | 38 | // replace the token with an empty string |
37 | 39 | private static void removeToken(Token token) { |
38 | 40 | LuaPreprocessor.hasChanges = true; |
39 | 41 | int from = token.getStartIndex(); |
40 | | - Bob.verbose("removeToken %s", token.getText()); |
| 42 | + logger.fine("removeToken " + token.getText()); |
41 | 43 | int to = from + token.getText().length() - 1; |
42 | 44 | for(int i = from; i <= to; i++) { |
43 | 45 | parsedBuffer.replace(i, i + 1, " "); |
@@ -92,7 +94,7 @@ public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int |
92 | 94 | } |
93 | 95 |
|
94 | 96 | if (LuaPreprocessor.hasChanges) { |
95 | | - Bob.verbose("LuaPreprocessor: apply %s", buildVariant); |
| 97 | + logger.fine("LuaPreprocessor: apply " + buildVariant); |
96 | 98 | return parsedBuffer.toString(); |
97 | 99 | } |
98 | 100 |
|
|
0 commit comments