mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Core - Added stores for the different register-able types
Profiles - Refactored large parts of the profile structure to use these stores
This commit is contained in:
1 parent
80d7d37f40
commit
ea9c6526d8
75 files changed
+1526
-934
No files matched your search
@@ -0,0 +1,44 @@
|
||||
using Newtonsoft.Json;
|
||||
using Ninject;
|
||||
using Serilog;
|
||||
|
||||
namespace Artemis.Core
|
||||
{
|
||||
internal static class DeserializationLogger
|
||||
{
|
||||
private static ILogger _logger;
|
||||
|
||||
public static void Initialize(IKernel kernel)
|
||||
{
|
||||
_logger = kernel.Get<ILogger>();
|
||||
}
|
||||
|
||||
public static void LogPredicateDeserializationFailure(DisplayConditionPredicate displayConditionPredicate, JsonException exception)
|
||||
{
|
||||
_logger.Warning(
|
||||
exception,
|
||||
"Failed to deserialize display condition predicate {left} {operator} {right}",
|
||||
displayConditionPredicate.Entity.LeftPropertyPath,
|
||||
displayConditionPredicate.Entity.OperatorType,
|
||||
displayConditionPredicate.Entity.RightPropertyPath
|
||||
);
|
||||
}
|
||||
|
||||
public static void LogListPredicateDeserializationFailure(DisplayConditionListPredicate displayConditionPredicate, JsonException exception)
|
||||
{
|
||||
_logger.Warning(
|
||||
exception,
|
||||
"Failed to deserialize display condition list predicate {list} => {left} {operator} {right}",
|
||||
displayConditionPredicate.Entity.ListPropertyPath,
|
||||
displayConditionPredicate.Entity.LeftPropertyPath,
|
||||
displayConditionPredicate.Entity.OperatorType,
|
||||
displayConditionPredicate.Entity.RightPropertyPath
|
||||
);
|
||||
}
|
||||
|
||||
public static void LogModifierDeserializationFailure(string modifierName, JsonSerializationException exception)
|
||||
{
|
||||
_logger.Warning(exception, "Failed to deserialize static parameter for modifier {modifierName}", modifierName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user