add debug support to interaction
This commit is contained in:
parent
4aedf5823e
commit
9c42552a0f
3 changed files with 15 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ ENV basic_Username='' \
|
||||||
interaction_InventoryTransferLevel='Owner' \
|
interaction_InventoryTransferLevel='Owner' \
|
||||||
interaction_GroupInviteLevel='Owner' \
|
interaction_GroupInviteLevel='Owner' \
|
||||||
interaction_TeleportRequestLevel='Owner' \
|
interaction_TeleportRequestLevel='Owner' \
|
||||||
|
interaction_EnableDebug='false' \
|
||||||
commands_HideStatusOutput='false' \
|
commands_HideStatusOutput='false' \
|
||||||
datastore_HideStatusOutput='false' \
|
datastore_HideStatusOutput='false' \
|
||||||
discord_HideStatusOutput='false' \
|
discord_HideStatusOutput='false' \
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,12 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("TeleportRequestLevel");
|
settings.Add("TeleportRequestLevel");
|
||||||
settings.Add("Enabled");
|
settings.Add("Enabled");
|
||||||
settings.Add("HideStatusOutput");
|
settings.Add("HideStatusOutput");
|
||||||
|
settings.Add("EnableDebug");
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool GetEnableDebug()
|
||||||
|
{
|
||||||
|
return ReadSettingAsBool("EnableDebug", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetFriendRequestLevel()
|
public string GetFriendRequestLevel()
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,10 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
protected void JsonOuput(bool status, string eventype, string from, string why="", Dictionary<string, string> setMisc = null)
|
protected void JsonOuput(bool status, string eventype, string from, string why="", Dictionary<string, string> setMisc = null)
|
||||||
{
|
{
|
||||||
|
if(myConfig.GetEnableDebug() == true)
|
||||||
|
{
|
||||||
|
LogFormater.Warn("Interaction debug:" + JsonConvert.SerializeObject(new InteractionEvent(from, eventype, status, why, setMisc)));
|
||||||
|
}
|
||||||
if (myConfig.GetEnableJsonOutputEvents() == false)
|
if (myConfig.GetEnableJsonOutputEvents() == false)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -134,6 +138,10 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
protected void JsonOuputCleaner(Dictionary<string, string> misc, string source)
|
protected void JsonOuputCleaner(Dictionary<string, string> misc, string source)
|
||||||
{
|
{
|
||||||
|
if (myConfig.GetEnableDebug() == true)
|
||||||
|
{
|
||||||
|
LogFormater.Warn("Interaction debug:" + JsonConvert.SerializeObject(misc));
|
||||||
|
}
|
||||||
if (myConfig.GetEnableJsonOutputEvents() == false)
|
if (myConfig.GetEnableJsonOutputEvents() == false)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue