mirror of https://github.com/FOME-Tech/fome-fw.git
reducing logging
This commit is contained in:
parent
9d8055a055
commit
efe0e5abc0
Binary file not shown.
|
@ -23,5 +23,6 @@
|
||||||
</library>
|
</library>
|
||||||
</orderEntry>
|
</orderEntry>
|
||||||
<orderEntry type="module" module-name="enum_to_string" />
|
<orderEntry type="module" module-name="enum_to_string" />
|
||||||
|
<orderEntry type="module" module-name="logging-api" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
|
@ -1,11 +1,11 @@
|
||||||
package com.rusefi;
|
package com.rusefi;
|
||||||
|
|
||||||
|
import com.devexperts.logging.Logging;
|
||||||
import com.opensr5.ini.RawIniFile;
|
import com.opensr5.ini.RawIniFile;
|
||||||
import com.opensr5.ini.field.EnumIniField;
|
import com.opensr5.ini.field.EnumIniField;
|
||||||
import com.rusefi.enum_reader.Value;
|
import com.rusefi.enum_reader.Value;
|
||||||
import com.rusefi.output.ConfigStructure;
|
import com.rusefi.output.ConfigStructure;
|
||||||
import com.rusefi.output.ConfigurationConsumer;
|
import com.rusefi.output.ConfigurationConsumer;
|
||||||
import com.rusefi.util.SystemOut;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -13,6 +13,7 @@ import java.io.Reader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.devexperts.logging.Logging.getLogging;
|
||||||
import static com.rusefi.ConfigField.BOOLEAN_T;
|
import static com.rusefi.ConfigField.BOOLEAN_T;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,6 +23,8 @@ import static com.rusefi.ConfigField.BOOLEAN_T;
|
||||||
* 12/19/18
|
* 12/19/18
|
||||||
*/
|
*/
|
||||||
public class ReaderState {
|
public class ReaderState {
|
||||||
|
private static final Logging log = getLogging(ReaderState.class);
|
||||||
|
|
||||||
public static final String BIT = "bit";
|
public static final String BIT = "bit";
|
||||||
private static final String CUSTOM = "custom";
|
private static final String CUSTOM = "custom";
|
||||||
private static final String END_STRUCT = "end_struct";
|
private static final String END_STRUCT = "end_struct";
|
||||||
|
@ -151,7 +154,8 @@ public class ReaderState {
|
||||||
if (stack.isEmpty())
|
if (stack.isEmpty())
|
||||||
throw new IllegalStateException("Unexpected end_struct");
|
throw new IllegalStateException("Unexpected end_struct");
|
||||||
ConfigStructure structure = stack.pop();
|
ConfigStructure structure = stack.pop();
|
||||||
SystemOut.println("Ending structure " + structure.getName());
|
if (log.debugEnabled())
|
||||||
|
log.debug("Ending structure " + structure.getName());
|
||||||
structure.addAlignmentFill(this);
|
structure.addAlignmentFill(this);
|
||||||
|
|
||||||
structures.put(structure.getName(), structure);
|
structures.put(structure.getName(), structure);
|
||||||
|
@ -233,7 +237,8 @@ public class ReaderState {
|
||||||
}
|
}
|
||||||
ConfigStructure structure = new ConfigStructure(name, comment, withPrefix);
|
ConfigStructure structure = new ConfigStructure(name, comment, withPrefix);
|
||||||
state.stack.push(structure);
|
state.stack.push(structure);
|
||||||
SystemOut.println("Starting structure " + structure.getName());
|
if (log.debugEnabled())
|
||||||
|
log.debug("Starting structure " + structure.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void processField(ReaderState state, String line) {
|
private static void processField(ReaderState state, String line) {
|
||||||
|
@ -256,7 +261,8 @@ public class ReaderState {
|
||||||
|
|
||||||
Integer getPrimitiveSize = TypesHelper.getPrimitiveSize(cf.getType());
|
Integer getPrimitiveSize = TypesHelper.getPrimitiveSize(cf.getType());
|
||||||
if (getPrimitiveSize != null && getPrimitiveSize % 4 == 0) {
|
if (getPrimitiveSize != null && getPrimitiveSize % 4 == 0) {
|
||||||
SystemOut.println("Need to align before " + cf.getName());
|
if (log.debugEnabled())
|
||||||
|
log.debug("Need to align before " + cf.getName());
|
||||||
structure.addAlignmentFill(state);
|
structure.addAlignmentFill(state);
|
||||||
} else {
|
} else {
|
||||||
// adding a structure instance - had to be aligned
|
// adding a structure instance - had to be aligned
|
||||||
|
|
|
@ -203,7 +203,7 @@ public class VariableRegistry {
|
||||||
javaDefinitions.put(var, "\tpublic static final int " + var + " = " + intValue + ";" + ToolUtil.EOL);
|
javaDefinitions.put(var, "\tpublic static final int " + var + " = " + intValue + ";" + ToolUtil.EOL);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
SystemOut.println("Not an integer: " + value);
|
//SystemOut.println("Not an integer: " + value);
|
||||||
|
|
||||||
if (!var.trim().endsWith(ENUM_SUFFIX)) {
|
if (!var.trim().endsWith(ENUM_SUFFIX)) {
|
||||||
if (isQuoted(value, '"')) {
|
if (isQuoted(value, '"')) {
|
||||||
|
|
Loading…
Reference in New Issue