Index: trunk/src/org/openstreetmap/josm/data/PreferencesUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/PreferencesUtils.java	(revision 12825)
+++ trunk/src/org/openstreetmap/josm/data/PreferencesUtils.java	(revision 12826)
@@ -23,5 +23,4 @@
 import org.openstreetmap.josm.data.preferences.Setting;
 import org.openstreetmap.josm.data.preferences.StringSetting;
-import org.openstreetmap.josm.gui.io.CustomConfigurator;
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Utils;
@@ -34,6 +33,55 @@
 public final class PreferencesUtils {
 
+    private static StringBuilder summary = new StringBuilder();
+
     private PreferencesUtils() {
         // Hide implicit public constructor for utility class
+    }
+
+    /**
+     * Log a formatted message.
+     * @param fmt format
+     * @param vars arguments
+     * @see String#format
+     * @since 12826
+     */
+    public static void log(String fmt, Object... vars) {
+        summary.append(String.format(fmt, vars));
+    }
+
+    /**
+     * Log a message.
+     * @param s message to log
+     * @since 12826
+     */
+    public static void log(String s) {
+        summary.append(s).append('\n');
+    }
+
+    /**
+     * Log an exception.
+     * @param e exception to log
+     * @param s message prefix
+     * @since 12826
+     */
+    public static void log(Exception e, String s) {
+        summary.append(s).append(' ').append(Logging.getErrorMessage(e)).append('\n');
+    }
+
+    /**
+     * Returns the log.
+     * @return the log
+     * @since 12826
+     */
+    public static String getLog() {
+        return summary.toString();
+    }
+
+    /**
+     * Resets the log.
+     * @since 12826
+     */
+    public static void resetLog() {
+        summary = new StringBuilder();
     }
 
@@ -112,5 +160,5 @@
                 // remove mentioned items from collection
                 for (String item : lSetting.getValue()) {
-                    CustomConfigurator.log("Deleting preferences: from list %s: %s\n", key, item);
+                    log("Deleting preferences: from list %s: %s\n", key, item);
                     newItems.remove(item);
                 }
@@ -128,5 +176,5 @@
                         if (list.containsAll(removeList)) {
                             // remove current list, because it matches search criteria
-                            CustomConfigurator.log("Deleting preferences: list from lists %s: %s\n", key, list);
+                            log("Deleting preferences: list from lists %s: %s\n", key, list);
                             listIterator.remove();
                         }
@@ -146,5 +194,5 @@
                         if (map.entrySet().containsAll(removeMap.entrySet())) {
                             // the map contain all mentioned key-value pair, so it should be deleted from "maps"
-                            CustomConfigurator.log("Deleting preferences: deleting map from maps %s: %s\n", key, map);
+                            log("Deleting preferences: deleting map from maps %s: %s\n", key, map);
                             mapIterator.remove();
                         }
@@ -161,5 +209,5 @@
             String key = entry.getKey();
             if (key.matches(pattern)) {
-                CustomConfigurator.log("Deleting preferences: deleting key from preferences: " + key);
+                log("Deleting preferences: deleting key from preferences: " + key);
                 pref.putSetting(key, null);
             }
@@ -170,5 +218,5 @@
         Map<String, Setting<?>> allSettings = pref.getAllSettings();
         if (allSettings.containsKey(key)) {
-            CustomConfigurator.log("Deleting preferences: deleting key from preferences: " + key);
+            log("Deleting preferences: deleting key from preferences: " + key);
             pref.putSetting(key, null);
         }
@@ -218,5 +266,5 @@
 
     private static void defaultUnknownWarning(String key) {
-        CustomConfigurator.log("Warning: Unknown default value of %s , skipped\n", key);
+        log("Warning: Unknown default value of %s , skipped\n", key);
         JOptionPane.showMessageDialog(
                 Main.parent,
@@ -285,5 +333,5 @@
             "    listmapMap.put(key, l);"+
             "  }  else {" +
-            "   " + CustomConfigurator.class.getName() + ".log('Unknown type:'+val.type+ '- use list, listlist or listmap'); }"+
+            "   " + PreferencesUtils.class.getName() + ".log('Unknown type:'+val.type+ '- use list, listlist or listmap'); }"+
             "  }";
         engine.eval(finish);
Index: trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java	(revision 12825)
+++ trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java	(revision 12826)
@@ -66,6 +66,4 @@
 public final class CustomConfigurator {
 
-    private static StringBuilder summary = new StringBuilder();
-
     private CustomConfigurator() {
         // Hide default constructor for utils classes
@@ -77,7 +75,9 @@
      * @param vars arguments
      * @see String#format
-     */
+     * @deprecated to be removed end of 2017. Use {@link PreferencesUtils#log(String, Object...)} instead
+     */
+    @Deprecated
     public static void log(String fmt, Object... vars) {
-        summary.append(String.format(fmt, vars));
+        PreferencesUtils.log(fmt, vars);
     }
 
@@ -85,7 +85,9 @@
      * Log a message.
      * @param s message to log
-     */
+     * @deprecated to be removed end of 2017. Use {@link PreferencesUtils#log(String)} instead
+     */
+    @Deprecated
     public static void log(String s) {
-        summary.append(s).append('\n');
+        PreferencesUtils.log(s);
     }
 
@@ -95,7 +97,9 @@
      * @param s message prefix
      * @since 10469
-     */
+     * @deprecated to be removed end of 2017. Use {@link PreferencesUtils#log(Exception, String)} instead
+     */
+    @Deprecated
     public static void log(Exception e, String s) {
-        summary.append(s).append(' ').append(Logging.getErrorMessage(e)).append('\n');
+        PreferencesUtils.log(e, s);
     }
 
@@ -103,14 +107,18 @@
      * Returns the log.
      * @return the log
-     */
+     * @deprecated to be removed end of 2017. Use {@link PreferencesUtils#getLog()} instead
+     */
+    @Deprecated
     public static String getLog() {
-        return summary.toString();
+        return PreferencesUtils.getLog();
     }
 
     /**
      * Resets the log.
-     */
+     * @deprecated to be removed end of 2017. Use {@link PreferencesUtils#resetLog()} instead
+     */
+    @Deprecated
     public static void resetLog() {
-        summary = new StringBuilder();
+        PreferencesUtils.resetLog();
     }
 
@@ -185,6 +193,6 @@
 
         MainApplication.worker.submit(downloadFileTask);
-        log("Info: downloading file from %s to %s in background ", parentDir, fOut.getAbsolutePath());
-        if (unzip) log("and unpacking it"); else log("");
+        PreferencesUtils.log("Info: downloading file from %s to %s in background ", parentDir, fOut.getAbsolutePath());
+        if (unzip) PreferencesUtils.log("and unpacking it"); else PreferencesUtils.log("");
 
     }
@@ -315,8 +323,8 @@
         String dir = getDirectoryByAbbr(base);
         if (dir == null) {
-            log("Error: Can not find base, use base=cache, base=prefs or base=plugins attribute.");
+            PreferencesUtils.log("Error: Can not find base, use base=cache, base=prefs or base=plugins attribute.");
             return;
         }
-        log("Delete file: %s\n", path);
+        PreferencesUtils.log("Delete file: %s\n", path);
         if (path.contains("..") || path.startsWith("/") || path.contains(":")) {
             return; // some basic protection
@@ -338,5 +346,5 @@
         }
         if (!Utils.deleteFile(f)) {
-            log("Warning: Can not delete file "+f.getPath());
+            PreferencesUtils.log("Warning: Can not delete file "+f.getPath());
         }
     }
@@ -356,11 +364,11 @@
 
         if (!installList.isEmpty()) {
-            log("Plugins install: "+installList);
+            PreferencesUtils.log("Plugins install: "+installList);
         }
         if (!removeList.isEmpty()) {
-            log("Plugins turn off: "+removeList);
+            PreferencesUtils.log("Plugins turn off: "+removeList);
         }
         if (!deleteList.isEmpty()) {
-            log("Plugins delete: "+deleteList);
+            PreferencesUtils.log("Plugins delete: "+deleteList);
         }
 
@@ -437,5 +445,5 @@
 
         public void openAndReadXML(File file) {
-            log("-- Reading custom preferences from " + file.getAbsolutePath() + " --");
+            PreferencesUtils.log("-- Reading custom preferences from " + file.getAbsolutePath() + " --");
             try {
                 String fileDir = file.getParentFile().getAbsolutePath();
@@ -445,5 +453,5 @@
                 }
             } catch (ScriptException | IOException | SecurityException ex) {
-                log(ex, "Error reading custom preferences:");
+                PreferencesUtils.log(ex, "Error reading custom preferences:");
             }
         }
@@ -456,7 +464,7 @@
                 }
             } catch (SAXException | IOException | ParserConfigurationException ex) {
-                log(ex, "Error reading custom preferences:");
-            }
-            log("-- Reading complete --");
+                PreferencesUtils.log(ex, "Error reading custom preferences:");
+            }
+            PreferencesUtils.log("-- Reading complete --");
         }
 
@@ -464,5 +472,5 @@
             try {
                 this.mainPrefs = mainPrefs;
-                resetLog();
+                PreferencesUtils.resetLog();
                 engine = new ScriptEngineManager().getEngineByName("JavaScript");
                 engine.eval("API={}; API.pref={}; API.fragments={};");
@@ -482,5 +490,5 @@
                 engine.eval("API.pluginDelete = function(names) { "+className+".pluginOperation('','',names);}");
             } catch (ScriptException ex) {
-                log("Error: initializing script engine: "+ex.getMessage());
+                PreferencesUtils.log("Error: initializing script engine: "+ex.getMessage());
                 Logging.error(ex);
             }
@@ -540,5 +548,5 @@
                     break;
                 default:
-                    log("Error: Unknown element " + elementName);
+                    PreferencesUtils.log("Error: Unknown element " + elementName);
                 }
             }
@@ -567,14 +575,14 @@
                     // we store this fragment as API.fragments['id']
                 } catch (ScriptException ex) {
-                    log(ex, "Error: can not load preferences fragment:");
+                    PreferencesUtils.log(ex, "Error: can not load preferences fragment:");
                 }
             }
 
             if ("replace".equals(oper)) {
-                log("Preferences replace: %d keys: %s\n",
+                PreferencesUtils.log("Preferences replace: %d keys: %s\n",
                    tmpPref.getAllSettings().size(), tmpPref.getAllSettings().keySet().toString());
                 PreferencesUtils.replacePreferences(tmpPref, mainPrefs);
             } else if ("append".equals(oper)) {
-                log("Preferences append: %d keys: %s\n",
+                PreferencesUtils.log("Preferences append: %d keys: %s\n",
                    tmpPref.getAllSettings().size(), tmpPref.getAllSettings().keySet().toString());
                 PreferencesUtils.appendPreferences(tmpPref, mainPrefs);
@@ -594,5 +602,5 @@
             String dir = getDirectoryByAbbr(base);
             if (dir == null) {
-                log("Error: Can not find directory to place file, use base=cache, base=prefs or base=plugins attribute.");
+                PreferencesUtils.log("Error: Can not find directory to place file, use base=cache, base=prefs or base=plugins attribute.");
                 return;
             }
@@ -605,5 +613,5 @@
             String address = evalVars(item.getAttribute("url"));
             if (address.isEmpty() || path.isEmpty()) {
-                log("Error: Please specify url=\"where to get file\" and path=\"where to place it\"");
+                PreferencesUtils.log("Error: Please specify url=\"where to get file\" and path=\"where to place it\"");
                 return;
             }
@@ -652,5 +660,5 @@
                 engine.eval(name+"='"+value+"';");
             } catch (ScriptException ex) {
-                log(ex, String.format("Error: Can not assign variable: %s=%s :", name, value));
+                PreferencesUtils.log(ex, String.format("Error: Can not assign variable: %s=%s :", name, value));
             }
         }
@@ -663,5 +671,5 @@
                 v = true;
             } else {
-                log("Error: Illegal test expression in if: %s=%s\n", elem.getAttribute("test"), realValue);
+                PreferencesUtils.log("Error: Illegal test expression in if: %s=%s\n", elem.getAttribute("test"), realValue);
             }
 
@@ -679,8 +687,8 @@
             Element task = tasksMap.get(taskName);
             if (task != null) {
-                log("EXECUTING TASK "+taskName);
+                PreferencesUtils.log("EXECUTING TASK "+taskName);
                 processXmlFragment(task); // process task recursively
             } else {
-                log("Error: Can not execute task "+taskName);
+                PreferencesUtils.log("Error: Can not execute task "+taskName);
                 return true;
             }
@@ -690,12 +698,12 @@
         private void processScriptElement(Element elem) {
             String js = elem.getChildNodes().item(0).getTextContent();
-            log("Processing script...");
+            PreferencesUtils.log("Processing script...");
             try {
                 PreferencesUtils.modifyPreferencesByScript(engine, mainPrefs, js);
             } catch (ScriptException ex) {
                 messageBox("e", ex.getMessage());
-                log(ex, "JS error:");
-            }
-            log("Script finished");
+                PreferencesUtils.log(ex, "JS error:");
+            }
+            PreferencesUtils.log("Script finished");
         }
 
@@ -713,5 +721,5 @@
                     mr.appendReplacement(sb, result);
                 } catch (ScriptException ex) {
-                    log(ex, String.format("Error: Can not evaluate expression %s :", mr.group(1)));
+                    PreferencesUtils.log(ex, String.format("Error: Can not evaluate expression %s :", mr.group(1)));
                 }
             }
@@ -734,5 +742,5 @@
                 tmpPref.fromXML(reader);
             } catch (TransformerException | XMLStreamException | IOException ex) {
-                log(ex, "Error: can not read XML fragment:");
+                PreferencesUtils.log(ex, "Error: can not read XML fragment:");
             }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 12825)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 12826)
@@ -39,4 +39,5 @@
 import org.openstreetmap.josm.actions.DiskAccessAction;
 import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.data.PreferencesUtils;
 import org.openstreetmap.josm.data.preferences.Setting;
 import org.openstreetmap.josm.data.preferences.StringSetting;
@@ -264,5 +265,5 @@
         for (File f : files) {
             CustomConfigurator.readXML(f, tmpPrefs);
-            log.append(CustomConfigurator.getLog());
+            log.append(PreferencesUtils.getLog());
         }
         log.append("</html>");
