mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
bug 150949 - Removed the public "debug" setting. It can now only be used when in a development environment. It generates far too many messages to be useful in a production setting.
This commit is contained in:
parent
cede258b82
commit
68d8ec8366
2 changed files with 15 additions and 3 deletions
|
@ -71,6 +71,15 @@ import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
|
|||
*
|
||||
*/
|
||||
public class Logger implements IPropertyChangeListener {
|
||||
|
||||
/**
|
||||
* Constant can be used to surround debugging code. Optimizing
|
||||
* compilers have the possibility of removing the code from
|
||||
* a production copy.
|
||||
*
|
||||
* Should be set false normally. Only set to true when testing.
|
||||
*/
|
||||
public static final boolean DEBUG = false;
|
||||
|
||||
private ILog systemsPluginLog = null;
|
||||
private RemoteSystemLogListener logListener = null;
|
||||
|
@ -121,7 +130,7 @@ public class Logger implements IPropertyChangeListener {
|
|||
* need to be localized to proper local.<br>
|
||||
*/
|
||||
public synchronized void logDebugMessage(String className, String message) {
|
||||
if (debug_level >= IRemoteSystemsLogging.LOG_DEBUG) {
|
||||
if (Logger.DEBUG && debug_level >= IRemoteSystemsLogging.LOG_DEBUG) {
|
||||
MultiStatus debugStatus = new MultiStatus(pluginId, IStatus.OK, className, null);
|
||||
Status infoStatus = new Status(IStatus.OK, pluginId, IStatus.OK, message, null);
|
||||
debugStatus.add(infoStatus);
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
|
|||
import org.eclipse.jface.preference.PreferencePage;
|
||||
import org.eclipse.jface.preference.PreferenceStore;
|
||||
import org.eclipse.rse.logging.IRemoteSystemsLogging;
|
||||
import org.eclipse.rse.logging.Logger;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
|
@ -94,8 +95,10 @@ public abstract class LoggingPreferencePage extends PreferencePage implements IW
|
|||
radioButton1 = createRadioButton(composite1_radioButton, LabelUtil.assignMnemonic(text, used));
|
||||
text = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_INFO_DEBUG;
|
||||
radioButton2 = createRadioButton(composite1_radioButton, LabelUtil.assignMnemonic(text, used));
|
||||
text = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_FULL_DEBUG;
|
||||
radioButton3 = createRadioButton(composite1_radioButton, LabelUtil.assignMnemonic(text, used));
|
||||
if (Logger.DEBUG) {
|
||||
text = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_FULL_DEBUG;
|
||||
radioButton3 = createRadioButton(composite1_radioButton, LabelUtil.assignMnemonic(text, used));
|
||||
}
|
||||
initializeValues();
|
||||
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "org.eclipse.rse.logging.rsel0000");
|
||||
return new Composite(parent, SWT.NULL);
|
||||
|
|
Loading…
Add table
Reference in a new issue