Repository: reef Updated Branches: refs/heads/master 3d1411d7d -> ffaf90655
[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 Project: http://git-wip-us.apache.org/repos/asf/reef/repo Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/ffaf9065 Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/ffaf9065 Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/ffaf9065 Branch: refs/heads/master Commit: ffaf906555a9148e478211fb57a91ee2a2de9210 Parents: 3d1411d Author: Julia Wang <[email protected]> Authored: Tue Oct 10 12:26:34 2017 -0700 Committer: Markus Weimer <[email protected]> Committed: Thu Oct 12 09:50:38 2017 +0200 ---------------------------------------------------------------------- .../Bridge/DriverBridgeConfigurationOptions.cs | 10 +++-- .../Attributes/BreakingAttribute.cs | 41 ++++++++++++++++++++ .../Org.Apache.Reef.Utilities.csproj | 1 + 3 files changed, 48 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/reef/blob/ffaf9065/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs ---------------------------------------------------------------------- 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.Defaults; 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 @@ namespace Org.Apache.REEF.Driver.Bridge /// </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 @@ namespace Org.Apache.REEF.Driver.Bridge { } - [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> { } http://git-wip-us.apache.org/repos/asf/reef/blob/ffaf9065/lang/cs/Org.Apache.REEF.Utilities/Attributes/BreakingAttribute.cs ---------------------------------------------------------------------- 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; } + } +} http://git-wip-us.apache.org/repos/asf/reef/blob/ffaf9065/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj ---------------------------------------------------------------------- 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 @@ under the License. <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" />
