Ignore:
Timestamp:
2017-08-22T22:26:32+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate all Main logging methods and introduce suitable replacements in Logging for most of them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r12273 r12620  
    2020import org.openstreetmap.josm.gui.io.SaveLayersDialog;
    2121import org.openstreetmap.josm.tools.ImageProvider;
     22import org.openstreetmap.josm.tools.Logging;
    2223import org.openstreetmap.josm.tools.Shortcut;
    2324
     
    5960            restartJOSM();
    6061        } catch (IOException ex) {
    61             Main.error(ex);
     62            Logging.error(ex);
    6263        }
    6364    }
     
    9394            cmd = getCommands();
    9495        }
    95         Main.info("Restart "+cmd);
    96         if (Main.isDebugEnabled() && Main.pref.getBoolean("restart.debug.simulation")) {
    97             Main.debug("Restart cancelled to get debug info");
     96        Logging.info("Restart "+cmd);
     97        if (Logging.isDebugEnabled() && Main.pref.getBoolean("restart.debug.simulation")) {
     98            Logging.debug("Restart cancelled to get debug info");
    9899            return;
    99100        }
     
    106107                    Runtime.getRuntime().exec(cmd.toArray(new String[cmd.size()]));
    107108                } catch (IOException e) {
    108                     Main.error(e);
     109                    Logging.error(e);
    109110                }
    110111            }
     
    138139        if (javaCommand.endsWith(".jnlp") && jnlp == null) {
    139140            // see #11751 - jnlp on Linux
    140             if (Main.isDebugEnabled()) {
    141                 Main.debug("Detected jnlp without jnlpx.origFilenameArg property set");
    142             }
     141            Logging.debug("Detected jnlp without jnlpx.origFilenameArg property set");
    143142            cmd.addAll(Arrays.asList(mainCommand));
    144143        } else {
     
    181180    private static void addVMArguments(Collection<String> cmd) {
    182181        List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
    183         if (Main.isDebugEnabled()) {
    184             Main.debug("VM arguments: "+arguments);
    185         }
     182        Logging.debug("VM arguments: {0}", arguments);
    186183        for (String arg : arguments) {
    187184            // When run from jp2launcher.exe, jnlpx.remove is true, while it is not when run from javaws
Note: See TracChangeset for help on using the changeset viewer.