List of usage examples for java.util.logging Level OFF
Level OFF
To view the source code for java.util.logging Level OFF.
Click Source Link
From source file:org.quickserver.net.server.QuickServer.java
/** * Sets the level for all log handlers./*from w ww. j a v a 2 s . c om*/ * @since 1.3.1 */ public void setLoggingLevel(Level level) { Logger rlogger = Logger.getLogger(""); Handler[] handlers = rlogger.getHandlers(); for (int index = 0; index < handlers.length; index++) { handlers[index].setLevel(level); } if (level == Level.SEVERE) loggingLevel = "SEVERE"; else if (level == Level.WARNING) loggingLevel = "WARNING"; else if (level == Level.INFO) loggingLevel = "INFO"; else if (level == Level.CONFIG) loggingLevel = "CONFIG"; else if (level == Level.FINE) loggingLevel = "FINE"; else if (level == Level.FINER) loggingLevel = "FINER"; else if (level == Level.FINEST) loggingLevel = "FINEST"; else if (level == Level.OFF) loggingLevel = "OFF"; else loggingLevel = "UNKNOWN"; consoleLoggingLevel = loggingLevel; logger.log(Level.FINE, "Set to {0}", level); }
From source file:org.quickserver.net.server.QuickServer.java
private void configConsoleLoggingLevel(QuickServer qs, String temp) { if (temp.equals("SEVERE")) qs.setConsoleLoggingLevel(Level.SEVERE); else if (temp.equals("WARNING")) qs.setConsoleLoggingLevel(Level.WARNING); else if (temp.equals("INFO")) qs.setConsoleLoggingLevel(Level.INFO); else if (temp.equals("CONFIG")) qs.setConsoleLoggingLevel(Level.CONFIG); else if (temp.equals("FINE")) qs.setConsoleLoggingLevel(Level.FINE); else if (temp.equals("FINER")) qs.setConsoleLoggingLevel(Level.FINER); else if (temp.equals("FINEST")) qs.setConsoleLoggingLevel(Level.FINEST); else if (temp.equals("OFF")) qs.setConsoleLoggingLevel(Level.OFF); else// w ww. j ava 2s .co m logger.log(Level.WARNING, "unknown level {0}", temp); }
From source file:org.apache.shindig.gadgets.oauth.OAuthFetcherTest.java
private void checkLogContains(String text) { if ((logger.getLevel() != null) && (logger.getLevel().equals(Level.OFF))) { return;// w w w . jav a 2 s . c o m } String logText = getLogText(); if (!logText.contains(text)) { fail("Should have logged '" + text + "', instead got " + logText); } }
From source file:com.machinepublishers.jbrowserdriver.Settings.java
private Settings(Settings.Builder builder, Map properties) { Settings.Builder defaults = Settings.builder(); Dimension screen = builder.screen == null ? defaults.screen : builder.screen; this.screenWidth = parse(properties, PropertyName.SCREEN_WIDTH, screen.getWidth()); this.screenHeight = parse(properties, PropertyName.SCREEN_HEIGHT, screen.getHeight()); this.cacheEntrySize = parse(properties, PropertyName.CACHE_ENTRY_SIZE, builder.cacheEntrySize); this.cacheEntries = parse(properties, PropertyName.CACHE_ENTRIES, builder.cacheEntries); this.cache = parse(properties, PropertyName.CACHE, builder.cache); this.ignoreDialogs = parse(properties, PropertyName.IGNORE_DIALOGS, builder.ignoreDialogs); this.saveAttachments = parse(properties, PropertyName.SAVE_ATTACHMENTS, builder.saveAttachments); this.saveMedia = parse(properties, PropertyName.SAVE_MEDIA, builder.saveMedia); this.ajaxWait = parse(properties, PropertyName.AJAX_WAIT, builder.ajaxWait); this.ajaxResourceTimeout = parse(properties, PropertyName.AJAX_RESOURCE_TIMEOUT, builder.ajaxResourceTimeout); this.blockAds = parse(properties, PropertyName.BLOCK_ADS, builder.blockAds); this.quickRender = parse(properties, PropertyName.QUICK_RENDER, builder.quickRender); this.maxRouteConnections = parse(properties, PropertyName.MAX_ROUTE_CONNECTIONS, builder.maxRouteConnections); this.maxConnections = parse(properties, PropertyName.MAX_CONNECTIONS, builder.maxConnections); this.logJavascript = parse(properties, PropertyName.LOG_JAVASCRIPT, builder.logJavascript); if (properties.get(PropertyName.JAVA_OPTIONS.propertyName) != null) { this.javaOptions = Collections.unmodifiableList( Arrays.asList(properties.get(PropertyName.JAVA_OPTIONS.propertyName).toString().split("\t"))); } else if (builder.javaOptions == null) { this.javaOptions = Collections.unmodifiableList(new ArrayList<String>()); } else {//from w ww . j a v a2s. co m this.javaOptions = Collections.unmodifiableList(Arrays.asList(builder.javaOptions)); } this.customClasspath = this.javaOptions.contains("-classpath") || this.javaOptions.contains("-cp"); this.javaBinary = parse(properties, PropertyName.JAVA_BINARY, builder.javaBinary); this.javaExportModules = parse(properties, PropertyName.JAVA_EXPORT_MODULES, builder.javaExportModules); if (properties.get(PropertyName.WIRE_CONSOLE.propertyName) != null) { System.err.println( "jBrowserDriver: The jbd.wireconsole setting is deprecated and will be removed in v2.0.0. Use jbd.logwire, jbd.logger, or jbd.logsmax instead."); this.logWire = parse(properties, PropertyName.WIRE_CONSOLE, builder.logWire); } else { this.logWire = parse(properties, PropertyName.LOG_WIRE, builder.logWire); } if (properties.get(PropertyName.TRACE_CONSOLE.propertyName) != null) { System.err.println( "jBrowserDriver: The jbd.traceconsole setting is deprecated and will be removed in v2.0.0. Use jbd.logtrace, jbd.logger, or jbd.logsmax instead."); this.logTrace = parse(properties, PropertyName.TRACE_CONSOLE, builder.logTrace); } else { this.logTrace = parse(properties, PropertyName.LOG_TRACE, builder.logTrace); } if (properties.get(PropertyName.WARN_CONSOLE.propertyName) != null) { System.err.println( "jBrowserDriver: The jbd.warnconsole setting is deprecated and will be removed in v2.0.0. Use jbd.logwarnings, jbd.logger, or jbd.logsmax instead."); this.logWarnings = parse(properties, PropertyName.WARN_CONSOLE, builder.logWarnings); } else { this.logWarnings = parse(properties, PropertyName.LOG_WARNINGS, builder.logWarnings); } if (properties.get(PropertyName.MAX_LOGS.propertyName) != null) { System.err.println( "jBrowserDriver: The jbd.maxlogs setting is deprecated and will be removed in v2.0.0. Use jbd.logsmax, jbd.logwire, jbd.logtrace, or jbd.logwarnings instead."); this.logsMax = parse(properties, PropertyName.MAX_LOGS, builder.logsMax); } else { this.logsMax = parse(properties, PropertyName.LOGS_MAX, builder.logsMax); } this.logger = parse(properties, PropertyName.LOGGER, builder.logger); if (this.logger == null) { this.loggerLevel = Level.OFF.intValue(); } else { Level curLevel = logger.getLevel(); this.loggerLevel = curLevel == null ? Level.INFO.intValue() : curLevel.intValue(); } this.hostnameVerification = parse(properties, PropertyName.HOSTNAME_VERIFICATION, builder.hostnameVerification); this.javascript = parse(properties, PropertyName.JAVASCRIPT, builder.javascript); this.socketTimeout = parse(properties, PropertyName.SOCKET_TIMEOUT_MS, builder.socketTimeout); this.connectTimeout = parse(properties, PropertyName.CONNECT_TIMEOUT_MS, builder.connectTimeout); this.connectionReqTimeout = parse(properties, PropertyName.CONNECTION_REQ_TIMEOUT_MS, builder.connectionReqTimeout); this.cacheDir = parse(properties, PropertyName.CACHE_DIR, builder.cacheDir); this.userDataDirectory = parse(properties, PropertyName.USER_DATA_DIRECTORY, builder.userDataDirectory); this.csrfRequestToken = parse(properties, PropertyName.CSRF_REQUEST_TOKEN, builder.csrfRequestToken); this.csrfResponseToken = parse(properties, PropertyName.CSRF_RESPONSE_TOKEN, builder.csrfResponseToken); this.host = parse(properties, PropertyName.HOST, builder.host); String portRangesTmp = null; int processesTmp = -1; if (properties.get(PropertyName.PORTS.propertyName) == null && properties.get(PropertyName.PORT_RANGES.propertyName) == null && properties.get(PropertyName.PROCESSES.propertyName) == null) { if (builder.processes > -1) { processesTmp = builder.processes; } else { portRangesTmp = builder.portRanges; } } else if (properties.get(PropertyName.PORTS.propertyName) != null) { System.err.println( "jBrowserDriver: The jbd.ports property is deprecated and will be removed in v2.0.0. Refer to Settings.Builder.processes(..) API documentation."); String portString = properties.get(PropertyName.PORTS.propertyName).toString(); Collection<Long> ports = new LinkedHashSet<Long>(); String[] ranges = portString.split(","); for (String range : ranges) { String[] bounds = range.split("-"); long low = Long.parseLong(bounds[0]); long high = bounds.length > 1 ? Long.parseLong(bounds[1]) : low; for (long j = low; j <= high; j++) { ports.add(j); } } processesTmp = ports.size(); } else if (properties.get(PropertyName.PORT_RANGES.propertyName) != null) { portRangesTmp = properties.get(PropertyName.PORT_RANGES.propertyName).toString(); } else { processesTmp = Integer.parseInt(properties.get(PropertyName.PROCESSES.propertyName).toString()); } if (portRangesTmp == null) { this.portGroups = parsePorts(processesTmp); } else { this.portGroups = parsePorts(portRangesTmp); } //backwards compatible property name for versions <= 0.9.1 boolean headlessTmp = parse(properties, PropertyName.HEADLESS, builder.headless); headlessTmp = System.getProperty(PropertyName.HEADLESS.propertyName) == null && System.getProperty("jbd.browsergui") != null ? !Boolean.parseBoolean(System.getProperty("jbd.browsergui")) : headlessTmp; this.headless = headlessTmp; if (System.getProperty("jbd.browsergui") != null) { System.err.println( "jBrowserDriver: The jbd.browsergui property is deprecated and will be removed in v2.0.0. Use jbd.headless property instead."); } //backwards compatible property name for versions <= 0.9.1 String sslTmp = parse(properties, PropertyName.SSL, builder.ssl); sslTmp = System.getProperty(PropertyName.SSL.propertyName) == null && System.getProperty("jbd.pemfile") != null ? System.getProperty("jbd.pemfile") : sslTmp; this.ssl = sslTmp; if (System.getProperty("jbd.pemfile") != null) { System.err.println( "jBrowserDriver: The jbd.pemfile property is deprecated and will be removed in v2.0.0. Use jbd.ssl property instead."); } RequestHeaders requestHeadersTmp = builder.requestHeaders; UserAgent userAgentTmp = builder.userAgent; if (properties.get(PropertyName.USER_AGENT.propertyName) != null) { String value = properties.get(PropertyName.USER_AGENT.propertyName).toString(); if ("tor".equalsIgnoreCase(value)) { requestHeadersTmp = RequestHeaders.TOR; userAgentTmp = UserAgent.TOR; } else if ("chrome".equalsIgnoreCase(value)) { requestHeadersTmp = RequestHeaders.CHROME; userAgentTmp = UserAgent.CHROME; } } requestHeadersTmp = requestHeadersTmp == null ? defaults.requestHeaders : requestHeadersTmp; userAgentTmp = userAgentTmp == null ? defaults.userAgent : userAgentTmp; this.requestHeaders = requestHeadersTmp; this.userAgentString = userAgentTmp.userAgentString(); ProxyConfig proxyTmp = builder.proxy; if (properties.get(PropertyName.PROXY_TYPE.propertyName) != null && properties.get(PropertyName.PROXY_HOST.propertyName) != null && properties.get(PropertyName.PROXY_PORT.propertyName) != null) { ProxyConfig.Type type = ProxyConfig.Type .valueOf(properties.get(PropertyName.PROXY_TYPE.propertyName).toString()); String host = properties.get(PropertyName.PROXY_HOST.propertyName).toString(); int port = Integer.parseInt(properties.get(PropertyName.PROXY_PORT.propertyName).toString()); String username = parse(properties, PropertyName.PROXY_USERNAME, (String) null); String password = parse(properties, PropertyName.PROXY_PASSWORD, (String) null); Object expectContinue = properties.get(PropertyName.PROXY_EXPECT_CONTINUE.propertyName); if (expectContinue == null) { proxyTmp = new ProxyConfig(type, host, port, username, password); } else { proxyTmp = new ProxyConfig(type, host, port, username, password, Boolean.parseBoolean(expectContinue.toString())); } } this.proxy = proxyTmp; Timezone timezoneTmp = builder.timezone; if (properties.get(PropertyName.TIMEZONE.propertyName) != null) { timezoneTmp = Timezone.byName(properties.get(PropertyName.TIMEZONE.propertyName).toString()); } timezoneTmp = timezoneTmp == null ? defaults.timezone : timezoneTmp; String scriptId = Util.randomPropertyName(); String headScriptTmp = parse(properties, PropertyName.HEAD_SCRIPT, builder.headScript); StringBuilder scriptBuilder = new StringBuilder(); StringBuilder scriptContentBuilder = new StringBuilder(); scriptBuilder.append("<script id='").append(scriptId).append("' language='javascript'>"); scriptContentBuilder.append("(function(){try{"); scriptContentBuilder.append(userAgentTmp.script()); scriptContentBuilder.append(timezoneTmp.script()); if (headScriptTmp != null) { scriptContentBuilder.append(headScriptTmp); } scriptContentBuilder.append("}catch(e){}})();"); this.scriptContent = scriptContentBuilder.toString(); scriptBuilder.append(this.scriptContent); scriptBuilder.append( "(function(){document.getElementsByTagName('head')[0].removeChild(document.getElementById('"); scriptBuilder.append(scriptId); scriptBuilder.append("'));})();"); scriptBuilder.append("</script>"); this.script = scriptBuilder.toString(); }
From source file:edu.jhu.cvrg.services.nodeDataService.DataStaging.java
public org.apache.axiom.om.OMElement collectAnalysisData(org.apache.axiom.om.OMElement param0) { logger.setLevel(Level.OFF); int x = 0;/*from w w w.j a v a 2 s . c o m*/ String sId = null; String token = null; OMElement subject = null; OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace dsNs = factory.createOMNamespace("http://www.cvrgrid.org/nodeDataService/", "dataStaging"); OMElement collectAnalysisData = factory.createOMElement("collectAnalysisData", dsNs); OMElement status = factory.createOMElement("status", dsNs); status.addChild(factory.createOMText("success")); collectAnalysisData.addChild(status); OMElement subjects = factory.createOMElement("analysis", dsNs); Iterator iterator = param0.getChildren(); String userId = ((OMElement) iterator.next()).getText(); File headFile = new File(localFtpRoot + sep + userId + sep + "public"); subjects = collectResultFiles(headFile, factory, dsNs, subjects); headFile = new File(localFtpRoot + sep + userId + sep + "private"); subject = collectResultFiles(headFile, factory, dsNs, subjects); collectAnalysisData.addChild(subjects); return collectAnalysisData; }
From source file:com.osparking.osparking.Settings_System.java
private void SettingsSaveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SettingsSaveButtonActionPerformed Connection conn = null;//from ww w.ja v a 2 s. c o m PreparedStatement updateSettings = null; int result = -1; boolean newStorePassingDelay = RecordPassingDelayChkBox.isSelected(); Locale locale = LanguageBox.getLocale(); boolean langNotSupported = (!locale.equals(defaultLocale) && !locale.equals(enUS_Locale)); if (langNotSupported) { String message = WRONG_LANG_DIALOG_1.getContent() + System.lineSeparator(); message += WRONG_LANG_DIALOG_2.getContent() + locale.getDisplayName() + System.lineSeparator() + System.lineSeparator(); message += WRONG_LANG_DIALOG_3.getContent() + System.lineSeparator(); message += WRONG_LANG_DIALOG_4.getContent() + defaultLocale.getDisplayName() + ", " + enUS_Locale.getDisplayName() + System.lineSeparator(); JOptionPane.showConfirmDialog(this, message, LANGUAGE_ERROR_TITLE.getContent(), JOptionPane.PLAIN_MESSAGE, WARNING_MESSAGE); return; } //<editor-fold desc="--check setting input errors"> if (!TextFieldNumericValueOK(TextFieldPicWidth, "Photo Extent Typing Errors")) { return; } if (!TextFieldNumericValueOK(TextFieldPicHeight, "Photo Height Typing Errors")) { return; } if (Integer.parseInt(removeNonNumeric(TextFieldPicHeight.getText().trim())) < 100) { TextFieldPicHeight.requestFocusInWindow(); JOptionPane.showConfirmDialog(this, "Please enter a height value of 100 or more", "Picture Height Input Error", JOptionPane.PLAIN_MESSAGE, WARNING_MESSAGE); return; } if (Integer.parseInt(removeNonNumeric(TextFieldPicWidth.getText().trim())) < 100) { TextFieldPicWidth.requestFocusInWindow(); JOptionPane.showConfirmDialog(this, "Please enter a width value of 100 or more", "Picture Width Input Error", JOptionPane.PLAIN_MESSAGE, WARNING_MESSAGE); return; } if (someIPaddressWrong()) { return; } if (someCOMportIDsame()) { return; } //</editor-fold> int newStatCount = 0; short pwLevel = -1; short optnLogLevel = -1; String maxLineStr = ""; int imageKeepDuration = 0; int picWidth = Integer.parseInt(removeNonNumeric(TextFieldPicWidth.getText())); int picHeight = Integer.parseInt(removeNonNumeric(TextFieldPicHeight.getText())); int flowCycle = Integer.parseInt(removeNonNumeric((String) FlowingComboBox.getSelectedItem())); int blinkCycle = Integer.parseInt(removeNonNumeric(TextFieldPicWidth.getText())); boolean gateCountChanged = false; try { StringBuffer sb = new StringBuffer("Update SettingsTable SET "); //<editor-fold desc="--create update statement"> sb.append("Lot_Name = ?, "); sb.append("perfEvalNeeded = ?, PWStrengthLevel = ?, OptnLoggingLevel = ?, "); sb.append("languageCode = ?, countryCode = ?, localeIndex = ?, statCount = ?, "); sb.append("MaxMessageLines = ?, GateCount = ?, "); sb.append("PictureWidth = ?, PictureHeight = ?, "); sb.append("EBD_flow_cycle = ?, EBD_blink_cycle = ?, "); sb.append("max_maintain_date = ? "); //</editor-fold> ConvComboBoxItem selectedItem = (ConvComboBoxItem) PopSizeCBox.getSelectedItem(); newStatCount = (Integer) selectedItem.getKeyValue(); if (newStorePassingDelay) { for (int gateID = 1; gateID <= gateCount; gateID++) { initPassingDelayStatIfNeeded(newStatCount, gateID); } } conn = JDBCMySQL.getConnection(); updateSettings = conn.prepareStatement(sb.toString()); int pIndex = 1; // <editor-fold defaultstate="collapsed" desc="--Provide values to each parameters of the UPDATE statement"> updateSettings.setString(pIndex++, lotNameTextField.getText().trim()); if (newStorePassingDelay) { updateSettings.setInt(pIndex++, 1); } else { updateSettings.setInt(pIndex++, 0); if (DEBUG) { // Give warning that in debug mode PassingDelay is always recorded. JOptionPane.showMessageDialog(null, RECORD_DELAY_DEBUG.getContent()); } } pwLevel = (short) (PWStrengthChoiceComboBox.getSelectedIndex()); updateSettings.setShort(pIndex++, pwLevel); optnLogLevel = (short) (OptnLoggingLevelComboBox.getSelectedIndex()); updateSettings.setShort(pIndex++, optnLogLevel); updateSettings.setString(pIndex++, LanguageBox.getLocale().getLanguage()); updateSettings.setString(pIndex++, LanguageBox.getLocale().getCountry()); updateSettings.setShort(pIndex++, (short) LanguageBox.getSelectedIndex()); updateSettings.setInt(pIndex++, PopSizeCBox.getSelectedIndex()); maxLineStr = (String) MessageMaxLineComboBox.getSelectedItem(); updateSettings.setShort(pIndex++, new Short(maxLineStr)); updateSettings.setShort(pIndex++, new Short((String) GateCountComboBox.getSelectedItem())); updateSettings.setInt(pIndex++, picWidth); updateSettings.setInt(pIndex++, picHeight); updateSettings.setInt(pIndex++, flowCycle); updateSettings.setInt(pIndex++, blinkCycle); ConvComboBoxItem item = (ConvComboBoxItem) ImageDurationCBox.getSelectedItem(); imageKeepDuration = (Integer) (item.getKeyValue()); updateSettings.setInt(pIndex++, imageKeepDuration); // </editor-fold> result = updateSettings.executeUpdate(); if (index2Level(opLoggingIndex) != Level.OFF && index2Level(optnLogLevel) == Level.OFF) { Globals.isFinalWishLog = true; } } catch (SQLException se) { Globals.logParkingException(Level.SEVERE, se, "(Save settings: " + (newStorePassingDelay ? "Y" : "N") + ")"); } finally { // <editor-fold defaultstate="collapsed" desc="--Return resources and display the save result"> closeDBstuff(conn, updateSettings, null, "(Save settings: " + (newStorePassingDelay ? "Y" : "N") + ")"); if (result == 1) { //<editor-fold desc="-- Log system settings change if set to do so"> if (statCount != newStatCount) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Statistics Population Size: " + statCount + " => " + newStatCount); } if (storePassingDelay != newStorePassingDelay) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Average Passing Delay: " + storePassingDelay + " => " + newStorePassingDelay); } if (pwStrengthLevel != pwLevel) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Password Strength Level: " + PWStrengthChoiceComboBox.getItemAt(pwStrengthLevel) + " => " + PWStrengthChoiceComboBox.getItemAt(pwLevel)); } if (opLoggingIndex != optnLogLevel) { logParkingOperation(OpLogLevel.LogAlways, "Settings Change, Gen' Operation Log Level: " + OptnLoggingLevelComboBox.getItemAt(opLoggingIndex) + " => " + OptnLoggingLevelComboBox.getItemAt(optnLogLevel)); } if (localeIndex != (short) LanguageBox.getSelectedIndex()) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Date Chooser Lang': " + LanguageBox.getItemAt(localeIndex) + " => " + LanguageBox.getItemAt((short) LanguageBox.getSelectedIndex())); } if (maxMessageLines != new Short(maxLineStr)) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Recent Event Line Max: " + maxMessageLines + " => " + new Short(maxLineStr)); } short newGateCount = new Short((String) GateCountComboBox.getSelectedItem()); gateCountChanged = gateCount != newGateCount; if (gateCountChanged) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Number of Gates: " + gateCount + " => " + newGateCount); } if (maxMaintainDate != imageKeepDuration) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Image Keep Duration: " + maxMaintainDate + " => " + imageKeepDuration); } if (PIC_WIDTH != picWidth) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Image width: " + PIC_WIDTH + " => " + picWidth); } if (PIC_HEIGHT != picHeight) { logParkingOperation(OpLogLevel.SettingsChange, "Settings Change, Image Height: " + PIC_HEIGHT + " => " + picHeight); } if (EBD_flowCycle != flowCycle) { logParkingOperation(OpLogLevel.UserCarChange, "E-Board Settings Change, Cycles--flowing: " + EBD_flowCycle + " => " + flowCycle); } if (EBD_blinkCycle != blinkCycle) { logParkingOperation(OpLogLevel.UserCarChange, "E-Board Settings Change, Cycles--blinking: " + EBD_blinkCycle + " => " + blinkCycle); } if (mainForm != null && gateCountChanged) { JOptionPane.showMessageDialog(mainForm, REBOOT_MESSAGE.getContent(), REBOOT_POPUP.getContent(), WARNING_MESSAGE, new javax.swing.ImageIcon(mainForm.getClass().getResource("/restart.png"))); mainForm.askUserIntentionOnProgramStop(true); } //</editor-fold> Globals.getOperationLog().setLevel(index2Level(opLoggingIndex)); } else { JOptionPane.showMessageDialog(this, FAIL_SAVE_SETTINGS_DIALOG.getContent(), SETTINGS_SAVE_RESULT.getContent(), JOptionPane.ERROR_MESSAGE); } // </editor-fold> } boolean majorChange[] = new boolean[] { false }; result += saveGateDevices(majorChange); if (mainForm != null && (gateCountChanged || majorChange[0])) { JOptionPane.showMessageDialog(mainForm, REBOOT_MESSAGE.getContent(), REBOOT_POPUP.getContent(), WARNING_MESSAGE, new javax.swing.ImageIcon(mainForm.getClass().getResource("/restart.png"))); mainForm.askUserIntentionOnProgramStop(true); } if (result == gateCount + 1) { readSettings(); Globals.getOperationLog().setLevel(index2Level(opLoggingIndex)); JOptionPane.showMessageDialog(this, SAVE_SETTINGS_DIALOG.getContent(), SETTINGS_SAVE_RESULT.getContent(), JOptionPane.PLAIN_MESSAGE); enableSaveCancelButtons(false); } else { JOptionPane.showMessageDialog(this, FAIL_SAVE_SETTINGS_DIALOG.getContent(), SETTINGS_SAVE_RESULT.getContent(), JOptionPane.ERROR_MESSAGE); } }