Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-03-05 19:56:43 +0000
committerThomas Watson2012-03-05 19:56:43 +0000
commit3c2df552bd099a46c95788c2cf76af4bdfd9472a (patch)
treed59114073115ca192c647def3afc0b1fd9ada21a
parent45fb68c833efdc1f43bd7aab875008feaad4a4e7 (diff)
downloadrt.equinox.framework-3c2df552bd099a46c95788c2cf76af4bdfd9472a.tar.gz
rt.equinox.framework-3c2df552bd099a46c95788c2cf76af4bdfd9472a.tar.xz
rt.equinox.framework-3c2df552bd099a46c95788c2cf76af4bdfd9472a.zip
Bug 341541 - Want to disable logging of commandlinev20120305-1956
-rw-r--r--bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLogWriter.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLogWriter.java b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLogWriter.java
index d0bb6ffbe..36eab8b08 100644
--- a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLogWriter.java
+++ b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLogWriter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -63,6 +63,8 @@ public class EclipseLogWriter implements SynchronousLogListener, LogFilter {
/** The extension markup to use for backup log files*/
private static final String BACKUP_MARK = ".bak_"; //$NON-NLS-1$
+ /** The system property used to specify command line args should be omitted from the log */
+ private static final String PROP_LOG_INCLUDE_COMMAND_LINE = "eclipse.log.include.commandline"; //$NON-NLS-1$
private static final SecureAction secureAction = AccessController.doPrivileged(SecureAction.createSecureAction());
/** Indicates if the console messages should be printed to the console (System.out) */
@@ -87,6 +89,7 @@ public class EclipseLogWriter implements SynchronousLogListener, LogFilter {
int backupIdx = 0;
private int logLevel = FrameworkLogEntry.OK;
+ private boolean includeCommandLine = true;
/**
* Constructs an EclipseLog which uses the specified File to log messages to
@@ -210,8 +213,10 @@ public class EclipseLogWriter implements SynchronousLogListener, LogFilter {
writeln(", NL=" + EclipseEnvironmentInfo.getDefault().getNL()); //$NON-NLS-1$
// Add the command-line arguments used to invoke the platform
// XXX: this includes runtime-private arguments - should we do that?
- writeArgs("Framework arguments: ", EclipseEnvironmentInfo.getDefault().getNonFrameworkArgs()); //$NON-NLS-1$
- writeArgs("Command-line arguments: ", EclipseEnvironmentInfo.getDefault().getCommandLineArgs()); //$NON-NLS-1$
+ if (includeCommandLine) {
+ writeArgs("Framework arguments: ", EclipseEnvironmentInfo.getDefault().getNonFrameworkArgs()); //$NON-NLS-1$
+ writeArgs("Command-line arguments: ", EclipseEnvironmentInfo.getDefault().getCommandLineArgs()); //$NON-NLS-1$
+ }
}
public void close() {
@@ -650,6 +655,8 @@ public class EclipseLogWriter implements SynchronousLogListener, LogFilter {
else
logLevel = FrameworkLogEntry.OK; // OK (0) means log everything
}
+
+ includeCommandLine = "true".equals(secureAction.getProperty(PROP_LOG_INCLUDE_COMMAND_LINE, "true")); //$NON-NLS-1$//$NON-NLS-2$
}
/**

Back to the top