Index: /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 10121)
+++ /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 10122)
@@ -27,4 +27,5 @@
 import javax.swing.event.ChangeListener;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.help.HelpBrowser;
 import org.openstreetmap.josm.gui.help.HelpUtil;
@@ -229,10 +230,6 @@
         }
 
-        if (msg instanceof String) {
-            msg = new JMultilineLabel((String) msg, true);
-        }
-
         final JOptionPane pane = new JOptionPane(
-                msg,
+                msg instanceof String ? new JMultilineLabel((String) msg, true) : msg,
                 messageType,
                 JOptionPane.DEFAULT_OPTION,
@@ -241,4 +238,16 @@
                 defaultButton
         );
+
+        // Log message. Useful for bug reports and unit tests
+        switch (messageType) {
+            case JOptionPane.ERROR_MESSAGE:
+                Main.error(title + " - " + msg);
+                break;
+            case JOptionPane.WARNING_MESSAGE:
+                Main.warn(title + " - " + msg);
+                break;
+            default:
+                Main.info(title + " - " + msg);
+        }
 
         if (!GraphicsEnvironment.isHeadless()) {
Index: /trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 10121)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 10122)
@@ -39,5 +39,4 @@
         try {
             System.setProperty("josm.plugins", "buildings_tools,plastic_laf");
-            assertEquals("buildings_tools,plastic_laf", System.getProperty("josm.plugins"));
             SplashProgressMonitor monitor = new SplashProgressMonitor("foo", new ChangeListener() {
                 @Override
@@ -47,5 +46,4 @@
             });
             Collection<PluginInformation> plugins = MainApplication.updateAndLoadEarlyPlugins(null, monitor);
-            assertEquals("buildings_tools,plastic_laf", System.getProperty("josm.plugins"));
             assertEquals(2, plugins.size());
             assertNotNull(PluginHandler.getPlugin("plastic_laf"));
