mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
reduce logging
This commit is contained in:
@@ -86,8 +86,10 @@ public class BuildingBlockManager {
|
||||
// update templates and a flag marking that we imported them
|
||||
configManager.writeValue(IPlugInPort.DEFAULT_BLOCKS_IMPORTED_KEY, true);
|
||||
configManager.writeValue(IPlugInPort.BLOCKS_KEY, blocksMap);
|
||||
LOG.info(String.format("Imported %d default building blocks",
|
||||
defaults == null ? 0 : defaults.size()));
|
||||
int importCount = defaults.size();
|
||||
if (importCount > 0) {
|
||||
LOG.info(String.format("Imported %d default building blocks", importCount));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not load default blocks", e);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ public class DatasheetService {
|
||||
public List<String[]> loadDatasheet(Class<?> clazz) {
|
||||
return datasheetCache.computeIfAbsent(clazz.getCanonicalName(), key -> {
|
||||
String fileName = clazz.getSimpleName() + ".datasheet";
|
||||
LOG.info("Loading datasheet file for " + fileName);
|
||||
InputStream inputStream = clazz.getResourceAsStream("/datasheets/" + fileName);
|
||||
if (inputStream == null) {
|
||||
LOG.warn("Datasheet file not found: " + fileName);
|
||||
@@ -67,7 +66,7 @@ public class DatasheetService {
|
||||
List<String[]> types =
|
||||
reader.lines().map(line -> line.split("\\s*,\\s*")).collect(Collectors.toList());
|
||||
|
||||
LOG.info(String.format("Loaded %d component sizes from the file", types.size()));
|
||||
LOG.info(String.format("Loaded %d component sizes from the file %s", types.size(), fileName));
|
||||
return types;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
||||
@@ -231,7 +231,7 @@ public class Presenter implements IPlugInPort {
|
||||
public void installPlugin(Supplier<IPlugIn> plugInSupplier) {
|
||||
try {
|
||||
IPlugIn plugIn = plugInSupplier.get();
|
||||
LOG.info(String.format("installPlugin(%s)", plugIn.getClass().getSimpleName()));
|
||||
// LOG.info(String.format("installPlugin(%s)", plugIn.getClass().getSimpleName()));
|
||||
plugIns.add(plugIn);
|
||||
plugIn.connect(this);
|
||||
messageDispatcher.registerListener(plugIn);
|
||||
|
||||
@@ -101,7 +101,9 @@ public class VariantManager {
|
||||
configManager.writeValue(IPlugInPort.DEFAULT_TEMPLATES_IMPORT_DATE_KEY,
|
||||
LocalDateTime.now());
|
||||
configManager.writeValue(IPlugInPort.TEMPLATES_KEY, variantMap);
|
||||
LOG.info(String.format("Imported default %d variants", importCount));
|
||||
if (importCount > 0) {
|
||||
LOG.info(String.format("Imported default %d variants", importCount));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not load default variants", e);
|
||||
}
|
||||
@@ -116,7 +118,6 @@ public class VariantManager {
|
||||
|
||||
upgradedVariants = true;
|
||||
|
||||
LOG.info("Checking if variants need to be updated");
|
||||
Map<String, List<Template>> lookupMap =
|
||||
new TreeMap<String, List<Template>>(String.CASE_INSENSITIVE_ORDER);
|
||||
Map<String, List<Template>> variantMap =
|
||||
|
||||
@@ -186,7 +186,6 @@ public class DIYLCStarter {
|
||||
LOG.info("Hiding splash screen...");
|
||||
splash.setVisible(false);
|
||||
splash.dispose();
|
||||
LOG.info("Done hiding splash screen.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ public class MainFrame extends JFrame implements ISwingUI {
|
||||
|
||||
@Override
|
||||
public void injectSubmenu(String name, Icon icon, String parentMenuName) {
|
||||
LOG.info(String.format("injectSubmenu(%s, icon, %s)", name, parentMenuName));
|
||||
// LOG.info(String.format("injectSubmenu(%s, icon, %s)", name, parentMenuName));
|
||||
|
||||
// translate
|
||||
name = LangUtil.translate(name);
|
||||
@@ -417,7 +417,7 @@ public class MainFrame extends JFrame implements ISwingUI {
|
||||
|
||||
@Override
|
||||
public void injectDynamicSubmenu(String name, Icon icon, String parentMenuName, final IDynamicSubmenuHandler handler) {
|
||||
LOG.info(String.format("injectDynamicSubmenu(%s, icon, %s)", name, parentMenuName));
|
||||
// LOG.info(String.format("injectDynamicSubmenu(%s, icon, %s)", name, parentMenuName));
|
||||
|
||||
// translate
|
||||
name = LangUtil.translate(name);
|
||||
|
||||
@@ -207,7 +207,7 @@ public class ConfigPlugin implements IPlugIn {
|
||||
if (entry.getKey().toLowerCase().endsWith(".xml")) {
|
||||
try {
|
||||
Theme theme = (Theme) xStream.fromXML(entry.getValue());
|
||||
LOG.debug("Found theme: " + theme.getName());
|
||||
// LOG.debug("Found theme: " + theme.getName());
|
||||
swingUI.injectMenuAction(ActionFactory.getInstance().createThemeAction(plugInPort, theme), THEME_MENU);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not load theme file " + entry.getKey(), e);
|
||||
|
||||
Reference in New Issue
Block a user