From 1c14796896d190c607f9f6a0522b9df019a0b979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ton=C4=87i=20Vatavuk?= Date: Thu, 28 Sep 2023 14:41:52 +0200 Subject: [PATCH] minor log --- .../Settings/DesignSettingsJsonConverter.cs | 2 +- .../Settings/Json/JsonConverterBase.cs | 10 +++++----- .../Settings/PairOnOffJsonConverter.cs | 2 +- .../Themes/Settings/ThemePartJsonConverter.cs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ToSic.Cre8Magic.Client/Settings/DesignSettingsJsonConverter.cs b/ToSic.Cre8Magic.Client/Settings/DesignSettingsJsonConverter.cs index 1c19b62..337bf43 100644 --- a/ToSic.Cre8Magic.Client/Settings/DesignSettingsJsonConverter.cs +++ b/ToSic.Cre8Magic.Client/Settings/DesignSettingsJsonConverter.cs @@ -30,7 +30,7 @@ public override void Write(Utf8JsonWriter writer, T? pair, JsonSerializerOptions public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - Logger.LogInformation($"2sic# Reading DesignSettingsJsonConverter {typeof(T)} / {typeToConvert}."); + Logger.LogInformation($"cre8magic# Reading DesignSettingsJsonConverter {typeof(T)} / {typeToConvert}."); var jsonNode = JsonNode.Parse(ref reader); const string errArray = "Error unexpected data - array instead of string or object"; diff --git a/ToSic.Cre8Magic.Client/Settings/Json/JsonConverterBase.cs b/ToSic.Cre8Magic.Client/Settings/Json/JsonConverterBase.cs index 6b5ce99..35be131 100644 --- a/ToSic.Cre8Magic.Client/Settings/Json/JsonConverterBase.cs +++ b/ToSic.Cre8Magic.Client/Settings/Json/JsonConverterBase.cs @@ -29,15 +29,15 @@ protected JsonSerializerOptions GetOptionsWithoutThisConverter(JsonSerializerOpt { if (IsInsideConverter) { - Logger.LogInformation("2sic# Already inside converter {Converter}", this); + Logger.LogInformation("cre8magic# Already inside converter {Converter}", this); return options; // Return the original options if we're already inside the converter } JsonSerializerOptions optionsWithoutConverter = new(options); if (!optionsWithoutConverter.Converters.Remove(this)) - Logger.LogWarning("2sic# Could not remove converter {Converter} from options", this); + Logger.LogWarning("cre8magic# Could not remove converter {Converter} from options", this); else - Logger.LogInformation("2sic# Removed converter {Converter} from options", this); + Logger.LogInformation("cre8magic# Removed converter {Converter} from options", this); return optionsWithoutConverter; } @@ -45,7 +45,7 @@ protected JsonSerializerOptions GetOptionsWithoutThisConverter(JsonSerializerOpt { try { - Logger.LogInformation("2sic# Deserializing {Type} from {Json}", typeof(T), jsonObject); + Logger.LogInformation("cre8magic# Deserializing {Type} from {Json}", typeof(T), jsonObject); IsInsideConverter = true; var result = jsonObject.Deserialize(GetOptionsWithoutThisConverter(options)); @@ -55,7 +55,7 @@ protected JsonSerializerOptions GetOptionsWithoutThisConverter(JsonSerializerOpt } catch { - Logger.LogError("2sic# Error while deserializing {Type} from {Json}", typeof(T), jsonObject); + Logger.LogError("cre8magic# Error while deserializing {Type} from {Json}", typeof(T), jsonObject); IsInsideConverter = false; // Ensure the flag is reset even if an exception occurs throw; } diff --git a/ToSic.Cre8Magic.Client/Settings/PairOnOffJsonConverter.cs b/ToSic.Cre8Magic.Client/Settings/PairOnOffJsonConverter.cs index 46f31b9..433ab51 100644 --- a/ToSic.Cre8Magic.Client/Settings/PairOnOffJsonConverter.cs +++ b/ToSic.Cre8Magic.Client/Settings/PairOnOffJsonConverter.cs @@ -40,7 +40,7 @@ public override void Write(Utf8JsonWriter writer, PairOnOff? pair, JsonSerialize public override PairOnOff? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - Logger.LogInformation($"2sic# Reading PairOnOffJsonConverter / {typeToConvert}."); + Logger.LogInformation($"cre8magic# Reading PairOnOffJsonConverter / {typeToConvert}."); var x = JsonNode.Parse(ref reader); return x switch { diff --git a/ToSic.Cre8Magic.Client/Themes/Settings/ThemePartJsonConverter.cs b/ToSic.Cre8Magic.Client/Themes/Settings/ThemePartJsonConverter.cs index 2eed265..ee04f6c 100644 --- a/ToSic.Cre8Magic.Client/Themes/Settings/ThemePartJsonConverter.cs +++ b/ToSic.Cre8Magic.Client/Themes/Settings/ThemePartJsonConverter.cs @@ -39,7 +39,7 @@ public override void Write(Utf8JsonWriter writer, MagicThemePartSettings? part, public override MagicThemePartSettings? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - Logger.LogInformation($"2sic# Reading ThemePartJsonConverter / {typeToConvert}."); + Logger.LogInformation($"cre8magic# Reading ThemePartJsonConverter / {typeToConvert}."); var x = JsonNode.Parse(ref reader); return x switch {