Skip to content

Commit 049f60f

Browse files
committed
* Update configs to min 1, default 5, max 20
1 parent 6987e46 commit 049f60f

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

Src/StackifyLib/Config.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ public static void LoadSettings()
111111
}
112112
}
113113

114-
var loggingJsonMaxDepth = Get("Stackify.Logging.JsonMaxDepth", "100");
114+
var loggingJsonMaxDepth = Get("Stackify.Logging.JsonMaxDepth", "5");
115115
if (string.IsNullOrWhiteSpace(loggingJsonMaxDepth) == false)
116116
{
117-
if (int.TryParse(loggingJsonMaxDepth, out int maxDepth) && maxDepth > 0 && maxDepth < 200)
117+
if (int.TryParse(loggingJsonMaxDepth, out int maxDepth) && maxDepth > 0 && maxDepth < 20)
118118
{
119119
LoggingJsonMaxDepth = maxDepth;
120120
}
@@ -161,7 +161,7 @@ public static void LoadSettings()
161161

162162
public static int LoggingJsonMaxFields { get; set; } = 50;
163163

164-
public static int LoggingJsonMaxDepth { get; set; } = 100;
164+
public static int LoggingJsonMaxDepth { get; set; } = 5;
165165

166166

167167
/// <summary>

Src/StackifyLib/StackifyLib.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1414
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
1515
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
16-
<Version>2.1.2</Version>
16+
<Version>2.1.3</Version>
1717
<Authors>StackifyLib</Authors>
1818
<PackageProjectUrl>https://github.com/stackify/stackify-api-dotnet</PackageProjectUrl>
1919
<PackageLicenseUrl>https://github.com/stackify/stackify-api-dotnet/blob/master/LICENSE</PackageLicenseUrl>
2020
<RepositoryUrl>https://github.com/stackify/stackify-api-dotnet</RepositoryUrl>
2121
<RepositoryType>git</RepositoryType>
2222
<PackageIconUrl>https://stackify.com/wp-content/uploads/2017/02/stk.png</PackageIconUrl>
23-
<AssemblyVersion>2.1.2.0</AssemblyVersion>
24-
<FileVersion>2.1.2.0</FileVersion>
23+
<AssemblyVersion>2.1.3.0</AssemblyVersion>
24+
<FileVersion>2.1.3.0</FileVersion>
2525
</PropertyGroup>
2626

2727
<ItemGroup>

test/StackifyLib.UnitTests/JsonSerialization_Tests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,9 @@ public void Should_Throw_On_Max_Depth()
6363
{
6464
var obj = GetTestObjectDepth();
6565

66-
Config.LoggingJsonMaxDepth = 5;
67-
6866
Assert.Throws<JsonSerializationException>(() =>
6967
{
7068
var result = StackifyLib.Utils.HelperFunctions.SerializeDebugData(obj, false);
71-
output.WriteLine(result);
72-
return result;
7369
});
7470
}
7571

0 commit comments

Comments
 (0)