[REEF-1897] Turn the default .Net driver log level to `Info`
JIRA:
[REEF-1897](https://issues.apache.org/jira/browse/REEF-1897)
Pull Request:
This closes #1386
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
index 57c0c7f..363961d 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
@@ -25,6 +25,7 @@
using Org.Apache.REEF.Driver.Evaluator;
using Org.Apache.REEF.Driver.Task;
using Org.Apache.REEF.Tang.Annotations;
+using Org.Apache.REEF.Utilities.Attributes;
[module: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass", Justification = "allow name parameter class to be embedded")]
@@ -35,8 +36,8 @@
/// </summary>
public sealed class DriverBridgeConfigurationOptions
{
- // Level.Verbose (since enum is not suppoted for TANG, we use a string here)
- private const string _verboseLevel = "Verbose";
+ // Level.Verbose (since enum is not supported for TANG, we use a string here)
+ private const string _infoLevel = "Info";
[NamedParameter(documentation: "The start point for application logic. Event fired after the Driver is done initializing.")]
public class DriverStartedHandlers : Name<ISet<IObserver<IDriverStarted>>>
@@ -148,12 +149,13 @@
{
}
- [NamedParameter("Additional trace listners supplied by client", "TraceListeners", null, defaultClasses: new[] { typeof(DefaultCustomTraceListener) })]
+ [NamedParameter("Additional trace listeners supplied by client", "TraceListeners", null, defaultClasses: new[] { typeof(DefaultCustomTraceListener) })]
public class TraceListenersSet : Name<ISet<TraceListener>>
{
}
- [NamedParameter("Custom Trace Level", "TraceLevel", defaultValue: _verboseLevel)]
+ [Breaking("The change is introduced in 0.17")]
+ [NamedParameter("Custom Trace Level", "TraceLevel", defaultValue: _infoLevel)]
public class TraceLevel : Name<string>
{
}
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/BreakingAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/BreakingAttribute.cs
new file mode 100644
index 0000000..d22b0ad
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/BreakingAttribute.cs
@@ -0,0 +1,41 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+using System;
+
+namespace Org.Apache.REEF.Utilities.Attributes
+{
+ /// <summary>
+ /// Indicates that the attribute target is a breaking change
+ /// </summary>
+ [AttributeUsage(AttributeTargets.All)]
+ public sealed class BreakingAttribute : Attribute
+ {
+ /// <summary>
+ /// </summary>
+ /// <param name="versionIntroduced">The version in which this breaking change was introduced.</param>
+ public BreakingAttribute(string versionIntroduced)
+ {
+ VersionIntroduced = versionIntroduced;
+ }
+
+ /// <summary>
+ /// The version in which this breaking change was introduced.
+ /// </summary>
+ public string VersionIntroduced { get; private set; }
+ }
+}
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
index f50c1b2..0e5ce4e 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
+++ b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
@@ -41,6 +41,7 @@
<Compile Include="AsyncUtils\LoggingHelper.cs" />
<Compile Include="AsyncUtils\RemoveSynchronizationContextAwaiter.cs" />
<Compile Include="AsyncUtils\VoidResult.cs" />
+ <Compile Include="Attributes\BreakingAttribute.cs" />
<Compile Include="Attributes\ClientSideAttribute.cs" />
<Compile Include="Attributes\DriverSideAttribute.cs" />
<Compile Include="Attributes\EvaluatorSideAttribute.cs" />