diff --git a/src/Digitalroot.Valheim.Common.Log/Digitalroot.Valheim.Common.Log.csproj b/src/Digitalroot.Valheim.Common.Log/Digitalroot.Valheim.Common.Log.csproj
index 818ca55..016d452 100644
--- a/src/Digitalroot.Valheim.Common.Log/Digitalroot.Valheim.Common.Log.csproj
+++ b/src/Digitalroot.Valheim.Common.Log/Digitalroot.Valheim.Common.Log.csproj
@@ -53,7 +53,7 @@
all
-
+
\ No newline at end of file
diff --git a/src/Digitalroot.Valheim.Common.Log/TraceLogger.cs b/src/Digitalroot.Valheim.Common.Log/TraceLogger.cs
index 587b5cb..250ac69 100644
--- a/src/Digitalroot.Valheim.Common.Log/TraceLogger.cs
+++ b/src/Digitalroot.Valheim.Common.Log/TraceLogger.cs
@@ -1,6 +1,7 @@
using BepInEx;
using BepInEx.Logging;
using Digitalroot.Valheim.Common.Json;
+using JetBrains.Annotations;
using System;
using System.IO;
using System.Reflection;
@@ -43,7 +44,8 @@ public void DisableTrace()
IsTraceEnabled = false;
}
- private void StopTrace()
+ [UsedImplicitly]
+ public void StopTrace()
{
LoggerRef.LogEvent -= OnLogEvent;
}
@@ -63,7 +65,7 @@ private void OnLogEvent(object sender, LogEventArgs e)
}
else
{
- var msg = $"[{e.Level,-7}:{e.Source.SourceName,10}] {JsonSerializationProvider.ToJson(e.Data)}{Environment.NewLine}";
+ var msg = $"[{e.Level,-7}:{e.Source.SourceName,10}] {JsonSerializationProvider.Serialize(e.Data)}{Environment.NewLine}";
File.AppendAllText(_traceFileInfo.FullName, msg, Encoding.UTF8);
}
}
diff --git a/src/Digitalroot.Valheim.Common.Log/packages.lock.json b/src/Digitalroot.Valheim.Common.Log/packages.lock.json
index 04110b9..934c1a0 100644
--- a/src/Digitalroot.Valheim.Common.Log/packages.lock.json
+++ b/src/Digitalroot.Valheim.Common.Log/packages.lock.json
@@ -14,21 +14,12 @@
},
"Digitalroot.Valheim.Common.Json": {
"type": "Direct",
- "requested": "[1.0.39, )",
- "resolved": "1.0.39",
- "contentHash": "AOQJgndG4hoVNw3cD8lS/xLE+BQ3cRPO1PkcVy775Ryau96lmhcWfMaI6T7MHD0tVgOQnvnWkap+nlzZOS9XpQ==",
+ "requested": "[1.0.40, )",
+ "resolved": "1.0.40",
+ "contentHash": "Iabdb4/ro5RtpLmIYpwcgvhkA3sCG57H/A3Mt7VZ+3E1u58w9Mi+asqhujrOmKBJeGbEBjfvv3UfFw4hLQM8wQ==",
"dependencies": {
"Digitalroot.References.Unity": "2022.3.17",
- "System.Text.Json": "8.0.3"
- }
- },
- "Microsoft.NETFramework.ReferenceAssemblies": {
- "type": "Direct",
- "requested": "[1.0.3, )",
- "resolved": "1.0.3",
- "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
- "dependencies": {
- "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
+ "LibZ.Tool": "1.2.0"
}
},
"BepInEx.BaseLib": {
@@ -49,18 +40,10 @@
"MonoMod.RuntimeDetour": "21.12.13.1"
}
},
- "Microsoft.Bcl.AsyncInterfaces": {
- "type": "Transitive",
- "resolved": "8.0.0",
- "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==",
- "dependencies": {
- "System.Threading.Tasks.Extensions": "4.5.4"
- }
- },
- "Microsoft.NETFramework.ReferenceAssemblies.net48": {
+ "LibZ.Tool": {
"type": "Transitive",
- "resolved": "1.0.3",
- "contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
+ "resolved": "1.2.0",
+ "contentHash": "jcZROJ28bmrZx/RaFHcTlSy3x4SmSsMolJiKoluFFrE7oMiXUnYx1K+SJeHJhow05W0Rg9oi9HEyZWwdYSV3cw=="
},
"Mono.Cecil": {
"type": "Transitive",
@@ -83,68 +66,6 @@
"dependencies": {
"Mono.Cecil": "0.11.4"
}
- },
- "System.Buffers": {
- "type": "Transitive",
- "resolved": "4.5.1",
- "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
- },
- "System.Memory": {
- "type": "Transitive",
- "resolved": "4.5.5",
- "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
- "dependencies": {
- "System.Buffers": "4.5.1",
- "System.Numerics.Vectors": "4.5.0",
- "System.Runtime.CompilerServices.Unsafe": "4.5.3"
- }
- },
- "System.Numerics.Vectors": {
- "type": "Transitive",
- "resolved": "4.5.0",
- "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
- },
- "System.Runtime.CompilerServices.Unsafe": {
- "type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
- },
- "System.Text.Encodings.Web": {
- "type": "Transitive",
- "resolved": "8.0.0",
- "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==",
- "dependencies": {
- "System.Buffers": "4.5.1",
- "System.Memory": "4.5.5",
- "System.Runtime.CompilerServices.Unsafe": "6.0.0"
- }
- },
- "System.Text.Json": {
- "type": "Transitive",
- "resolved": "8.0.3",
- "contentHash": "hpagS9joOwv6efWfrMmV9MjQXpiXZH72PgN067Ysfr6AWMSD1/1hEcvh/U5mUpPLezEWsOJSuVrmqDIVD958iA==",
- "dependencies": {
- "Microsoft.Bcl.AsyncInterfaces": "8.0.0",
- "System.Buffers": "4.5.1",
- "System.Memory": "4.5.5",
- "System.Runtime.CompilerServices.Unsafe": "6.0.0",
- "System.Text.Encodings.Web": "8.0.0",
- "System.Threading.Tasks.Extensions": "4.5.4",
- "System.ValueTuple": "4.5.0"
- }
- },
- "System.Threading.Tasks.Extensions": {
- "type": "Transitive",
- "resolved": "4.5.4",
- "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
- "dependencies": {
- "System.Runtime.CompilerServices.Unsafe": "4.5.3"
- }
- },
- "System.ValueTuple": {
- "type": "Transitive",
- "resolved": "4.5.0",
- "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
}
}
}
diff --git a/src/UnitTests/packages.lock.json b/src/UnitTests/packages.lock.json
index 1c416b4..470066d 100644
--- a/src/UnitTests/packages.lock.json
+++ b/src/UnitTests/packages.lock.json
@@ -21,15 +21,6 @@
"Microsoft.CodeCoverage": "17.9.0"
}
},
- "Microsoft.NETFramework.ReferenceAssemblies": {
- "type": "Direct",
- "requested": "[1.0.3, )",
- "resolved": "1.0.3",
- "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
- "dependencies": {
- "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
- }
- },
"NUnit": {
"type": "Direct",
"requested": "[4.1.0, )",
@@ -63,11 +54,11 @@
},
"Digitalroot.Valheim.Common.Json": {
"type": "Transitive",
- "resolved": "1.0.39",
- "contentHash": "AOQJgndG4hoVNw3cD8lS/xLE+BQ3cRPO1PkcVy775Ryau96lmhcWfMaI6T7MHD0tVgOQnvnWkap+nlzZOS9XpQ==",
+ "resolved": "1.0.40",
+ "contentHash": "Iabdb4/ro5RtpLmIYpwcgvhkA3sCG57H/A3Mt7VZ+3E1u58w9Mi+asqhujrOmKBJeGbEBjfvv3UfFw4hLQM8wQ==",
"dependencies": {
"Digitalroot.References.Unity": "2022.3.17",
- "System.Text.Json": "8.0.3"
+ "LibZ.Tool": "1.2.0"
}
},
"HarmonyX": {
@@ -78,24 +69,16 @@
"MonoMod.RuntimeDetour": "21.12.13.1"
}
},
- "Microsoft.Bcl.AsyncInterfaces": {
+ "LibZ.Tool": {
"type": "Transitive",
- "resolved": "8.0.0",
- "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==",
- "dependencies": {
- "System.Threading.Tasks.Extensions": "4.5.4"
- }
+ "resolved": "1.2.0",
+ "contentHash": "jcZROJ28bmrZx/RaFHcTlSy3x4SmSsMolJiKoluFFrE7oMiXUnYx1K+SJeHJhow05W0Rg9oi9HEyZWwdYSV3cw=="
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
"resolved": "17.9.0",
"contentHash": "RGD37ZSrratfScYXm7M0HjvxMxZyWZL4jm+XgMZbkIY1UPgjUpbNA/t+WTGj/rC/0Hm9A3IrH3ywbKZkOCnoZA=="
},
- "Microsoft.NETFramework.ReferenceAssemblies.net48": {
- "type": "Transitive",
- "resolved": "1.0.3",
- "contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
- },
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.11.4",
@@ -118,54 +101,10 @@
"Mono.Cecil": "0.11.4"
}
},
- "System.Buffers": {
- "type": "Transitive",
- "resolved": "4.5.1",
- "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
- },
- "System.Memory": {
- "type": "Transitive",
- "resolved": "4.5.5",
- "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
- "dependencies": {
- "System.Buffers": "4.5.1",
- "System.Numerics.Vectors": "4.5.0",
- "System.Runtime.CompilerServices.Unsafe": "4.5.3"
- }
- },
- "System.Numerics.Vectors": {
- "type": "Transitive",
- "resolved": "4.5.0",
- "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
- },
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
- },
- "System.Text.Encodings.Web": {
- "type": "Transitive",
- "resolved": "8.0.0",
- "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==",
- "dependencies": {
- "System.Buffers": "4.5.1",
- "System.Memory": "4.5.5",
- "System.Runtime.CompilerServices.Unsafe": "6.0.0"
- }
- },
- "System.Text.Json": {
- "type": "Transitive",
- "resolved": "8.0.3",
- "contentHash": "hpagS9joOwv6efWfrMmV9MjQXpiXZH72PgN067Ysfr6AWMSD1/1hEcvh/U5mUpPLezEWsOJSuVrmqDIVD958iA==",
- "dependencies": {
- "Microsoft.Bcl.AsyncInterfaces": "8.0.0",
- "System.Buffers": "4.5.1",
- "System.Memory": "4.5.5",
- "System.Runtime.CompilerServices.Unsafe": "6.0.0",
- "System.Text.Encodings.Web": "8.0.0",
- "System.Threading.Tasks.Extensions": "4.5.4",
- "System.ValueTuple": "4.5.0"
- }
+ "resolved": "4.5.3",
+ "contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
@@ -175,15 +114,10 @@
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
- "System.ValueTuple": {
- "type": "Transitive",
- "resolved": "4.5.0",
- "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
- },
"digitalroot.valheim.common.log": {
"type": "Project",
"dependencies": {
- "Digitalroot.Valheim.Common.Json": "[1.0.39, )"
+ "Digitalroot.Valheim.Common.Json": "[1.0.40, )"
}
}
}