diff --git a/.autover/changes/408f1584-3b66-45eb-bdf3-d154527e4c8c.json b/.autover/changes/408f1584-3b66-45eb-bdf3-d154527e4c8c.json new file mode 100644 index 000000000..1c3c6e7fb --- /dev/null +++ b/.autover/changes/408f1584-3b66-45eb-bdf3-d154527e4c8c.json @@ -0,0 +1,11 @@ +{ + "Projects": [ + { + "Name": "Amazon.Lambda.Core", + "Type": "Minor", + "ChangelogMessages": [ + "Removed RequiresPreviewFeatures attribute from parameterized logging APIs" + ] + } + ] +} \ No newline at end of file diff --git a/Libraries/src/Amazon.Lambda.Core/ILambdaLogger.cs b/Libraries/src/Amazon.Lambda.Core/ILambdaLogger.cs index 7f1cac273..9d4fdeeb0 100644 --- a/Libraries/src/Amazon.Lambda.Core/ILambdaLogger.cs +++ b/Libraries/src/Amazon.Lambda.Core/ILambdaLogger.cs @@ -147,12 +147,6 @@ public interface ILambdaLogger void LogCritical(string message) => Log(LogLevel.Critical.ToString(), message); - private const string ParameterizedPreviewMessage = - "Parameterized logging is in preview till a new version of .NET Lambda runtime client that supports parameterized logging " + - "has been deployed to the .NET Lambda managed runtime. Till deployment has been made the feature can be used by deploying as an " + - "executable including the latest version of Amazon.Lambda.RuntimeSupport and setting the \"EnablePreviewFeatures\" in the Lambda " + - "project file to \"true\""; - /// /// Log message categorized by the given log level /// @@ -163,7 +157,6 @@ public interface ILambdaLogger /// Log level of the message. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void Log(string level, string message, params object[] args) => Log(level, message, args); /// @@ -177,7 +170,6 @@ public interface ILambdaLogger /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void Log(string level, Exception exception, string message, params object[] args) { Log(level, message, args); @@ -194,7 +186,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Log level of the message. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void Log(LogLevel level, string message, params object[] args) => Log(level.ToString(), message, args); /// @@ -208,7 +199,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void Log(LogLevel level, Exception exception, string message, params object[] args) => Log(level.ToString(), exception, message, args); /// @@ -220,7 +210,6 @@ void Log(string level, Exception exception, string message, params object[] args /// /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogTrace(string message, params object[] args) => Log(LogLevel.Trace.ToString(), message, args); /// @@ -233,7 +222,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogTrace(Exception exception, string message, params object[] args) => Log(LogLevel.Trace.ToString(), exception, message, args); /// @@ -245,7 +233,6 @@ void Log(string level, Exception exception, string message, params object[] args /// /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogDebug(string message, params object[] args) => Log(LogLevel.Debug.ToString(), message, args); /// @@ -258,7 +245,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogDebug(Exception exception, string message, params object[] args) => Log(LogLevel.Debug.ToString(), exception, message, args); /// @@ -270,7 +256,6 @@ void Log(string level, Exception exception, string message, params object[] args /// /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogInformation(string message, params object[] args) => Log(LogLevel.Information.ToString(), message, args); /// @@ -283,7 +268,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogInformation(Exception exception, string message, params object[] args) => Log(LogLevel.Information.ToString(), exception, message, args); /// @@ -295,7 +279,6 @@ void Log(string level, Exception exception, string message, params object[] args /// /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogWarning(string message, params object[] args) => Log(LogLevel.Warning.ToString(), message, args); /// @@ -308,7 +291,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogWarning(Exception exception, string message, params object[] args) => Log(LogLevel.Warning.ToString(), exception, message, args); /// @@ -320,7 +302,6 @@ void Log(string level, Exception exception, string message, params object[] args /// /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogError(string message, params object[] args) => Log(LogLevel.Error.ToString(), message, args); /// @@ -333,7 +314,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogError(Exception exception, string message, params object[] args) => Log(LogLevel.Error.ToString(), exception, message, args); /// @@ -345,7 +325,6 @@ void Log(string level, Exception exception, string message, params object[] args /// /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogCritical(string message, params object[] args) => Log(LogLevel.Critical.ToString(), message, args); /// @@ -358,7 +337,6 @@ void Log(string level, Exception exception, string message, params object[] args /// Exception to include with the logging. /// Message to log. /// Values to be replaced in log messages that are parameterized. - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] void LogCritical(Exception exception, string message, params object[] args) => Log(LogLevel.Critical.ToString(), exception, message, args); #endif diff --git a/Libraries/src/Amazon.Lambda.RuntimeSupport/Context/LambdaConsoleLogger.cs b/Libraries/src/Amazon.Lambda.RuntimeSupport/Context/LambdaConsoleLogger.cs index 6a82d4765..e0faac022 100644 --- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Context/LambdaConsoleLogger.cs +++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Context/LambdaConsoleLogger.cs @@ -46,19 +46,11 @@ public void Log(string level, string message) _consoleLoggerRedirector.FormattedWriteLine(level, message); } - private const string ParameterizedPreviewMessage = - "Parameterized logging is in preview till a new version of .NET Lambda runtime client that supports parameterized logging " + - "has been deployed to the .NET Lambda managed runtime. Till deployment has been made the feature can be used by deploying as an " + - "executable including the latest version of Amazon.Lambda.RuntimeSupport and setting the \"LangVersion\" in the Lambda " + - "project file to \"preview\""; - - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] public void Log(string level, string message, params object[] args) { _consoleLoggerRedirector.FormattedWriteLine(level, message, args); } - [RequiresPreviewFeatures(ParameterizedPreviewMessage)] public void Log(string level, Exception exception, string message, params object[] args) { _consoleLoggerRedirector.FormattedWriteLine(level, exception, message, args);