Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-12-05 16:45:43 +0000
committerUwe Stieber2012-12-05 16:45:43 +0000
commit5ba092eb863d09291874acd7dec620b9897a2ad6 (patch)
tree06b0fbae0e43331c76d63a400d354a87f96d9092 /target_explorer
parent260cb135196b325c8b4f64de1b3ede5c0c3e713c (diff)
downloadorg.eclipse.tcf-5ba092eb863d09291874acd7dec620b9897a2ad6.tar.gz
org.eclipse.tcf-5ba092eb863d09291874acd7dec620b9897a2ad6.tar.xz
org.eclipse.tcf-5ba092eb863d09291874acd7dec620b9897a2ad6.zip
Target Explorer: Changed value-add tracing to use system properties
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java62
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddLauncher.java4
2 files changed, 28 insertions, 38 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java
index a65ace9c0..921554482 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java
@@ -1,36 +1,26 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.interfaces.tracing;
-
-/**
- * TCF core plug-in trace slot identifiers.
- */
-public interface ITraceIds {
-
- /**
- * If activated, tracing information about channel open/close is printed out.
- */
- public static String TRACE_CHANNELS = "trace/channels"; //$NON-NLS-1$
-
- /**
- * If activated, tracing information about the channel manager is printed out.
- */
- public static String TRACE_CHANNEL_MANAGER = "trace/channelManager"; //$NON-NLS-1$
-
- /**
- * If activated, the value-add is launched with logging enabled.
- */
- public static String VA_LOGGING_ENABLE = "va/logging/enable"; //$NON-NLS-1$
-
- /**
- * The value-add log level. Defaults to <code>0x0620</code>.
- */
- public static String VA_LOGGING_LEVEL = "va/logging/level"; //$NON-NLS-1$
-}
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Wind River Systems, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.interfaces.tracing;
+
+/**
+ * TCF core plug-in trace slot identifiers.
+ */
+public interface ITraceIds {
+
+ /**
+ * If activated, tracing information about channel open/close is printed out.
+ */
+ public static String TRACE_CHANNELS = "trace/channels"; //$NON-NLS-1$
+
+ /**
+ * If activated, tracing information about the channel manager is printed out.
+ */
+ public static String TRACE_CHANNEL_MANAGER = "trace/channelManager"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddLauncher.java
index 9528a86d6..140ccdc18 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddLauncher.java
@@ -111,7 +111,7 @@ public class ValueAddLauncher extends ProcessLauncher implements IDisposable {
addToCommand(command, "-sTCP::" + (port != -1 ? Integer.valueOf(port) : "") + ";ValueAdd=1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// Enable logging?
- if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.VA_LOGGING_ENABLE)) {
+ if (Boolean.getBoolean("va.logging.enable")) { //$NON-NLS-1$
// Calculate the location and name of the log file
Bundle bundle = Platform.getBundle("org.eclipse.tcf.te.tcf.log.core"); //$NON-NLS-1$
IPath location = bundle != null ? Platform.getStateLocation(bundle) : null;
@@ -125,7 +125,7 @@ public class ValueAddLauncher extends ProcessLauncher implements IDisposable {
location = location.append(name);
addToCommand(command, "-L" + location.toString()); //$NON-NLS-1$
- String level = Platform.getDebugOption(CoreBundleActivator.getUniqueIdentifier() + "/" + ITraceIds.VA_LOGGING_LEVEL); //$NON-NLS-1$
+ String level = System.getProperty("va.logging.level"); //$NON-NLS-1$
if (level != null && !"".equals(level.trim())) { //$NON-NLS-1$
addToCommand(command, "-l" + level.trim()); //$NON-NLS-1$
}

Back to the top