Minor logging changes.
This commit is contained in:
@ -39,7 +39,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
|
||||
var group = _groups.Get(policy.GroupId.ToString());
|
||||
if (group == null)
|
||||
{
|
||||
_logger.Warning($"Policy data is failed: group id not found [group id: {policy.GroupId}][policy id: {policy.Id}]");
|
||||
_logger.Warning($"Policy's group id not found [group id: {policy.GroupId}][policy id: {policy.Id}]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
|
||||
|
||||
foreach (var chatter in groupInfo.GroupChatters)
|
||||
if (groupsById.TryGetValue(chatter.GroupId, out var group))
|
||||
_groups.Add(chatter.ChatterId, group.Name);
|
||||
_groups.Add(chatter.ChatterId, group.Id);
|
||||
_logger.Information($"Users in each group [count: {groupInfo.GroupChatters.Count()}] have been loaded.");
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
|
||||
var group = _groups.Get(policy.GroupId.ToString());
|
||||
if (group == null)
|
||||
{
|
||||
_logger.Debug($"Policy data failed: group id not found [group id: {policy.GroupId}][policy id: {policy.Id}]");
|
||||
_logger.Debug($"Policy's group id not found [group id: {policy.GroupId}][policy id: {policy.Id}]");
|
||||
continue;
|
||||
}
|
||||
_logger.Debug($"Policy data loaded [policy id: {policy.Id}][path: {policy.Path}][group id: {policy.GroupId}][group name: {group.Name}]");
|
||||
|
@ -24,16 +24,22 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
|
||||
|
||||
public void Acknowledge(string requestId, string? json, IDictionary<string, object>? requestData)
|
||||
{
|
||||
if (json == null)
|
||||
{
|
||||
_logger.Warning($"Policy JSON data is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
var policy = JsonSerializer.Deserialize<Policy>(json, _options);
|
||||
if (policy == null)
|
||||
{
|
||||
_logger.Warning($"Policy data failed: null");
|
||||
_logger.Warning($"Policy data is null.");
|
||||
return;
|
||||
}
|
||||
var group = _groups.Get(policy.GroupId.ToString());
|
||||
if (group == null)
|
||||
{
|
||||
_logger.Warning($"Policy data failed: group id not found [group id: {policy.GroupId}][policy id: {policy.Id}]");
|
||||
_logger.Warning($"Policy's group id not found [group id: {policy.GroupId}][policy id: {policy.Id}]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -21,10 +21,16 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
|
||||
|
||||
public void Acknowledge(string requestId, string? json, IDictionary<string, object>? requestData)
|
||||
{
|
||||
if (json == null)
|
||||
{
|
||||
_logger.Warning($"TTS Filter JSON data is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
var filter = JsonSerializer.Deserialize<TTSWordFilter>(json, _options);
|
||||
if (filter == null)
|
||||
{
|
||||
_logger.Warning($"TTS Filter data failed: null");
|
||||
_logger.Warning($"TTS Filter data is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user