Move Debug logs under DebugOnly
This commit is contained in:
@@ -125,7 +125,7 @@ public class InventoryLifecycles : IDisposable
|
||||
|
||||
GeneralSettings config = System.Config.General;
|
||||
|
||||
Services.Logger.Debug("PreRefresh event for Inventory detected");
|
||||
Services.Logger.DebugOnly("PreRefresh event for Inventory detected");
|
||||
|
||||
AtkValuePtr[] atkValues = refreshArgs.AtkValueEnumerable.ToArray();
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ public abstract unsafe class InventoryAddonBase : NativeAddon, IInventoryWindow
|
||||
ReferenceIndex = (short)absoluteIndex
|
||||
};
|
||||
|
||||
Services.Logger.Debug($"[BackgroundDrop] Target: {emptyLocation} -> Visual: {visualLocation} (Ref: {absoluteIndex})");
|
||||
Services.Logger.DebugOnly($"[BackgroundDrop] Target: {emptyLocation} -> Visual: {visualLocation} (Ref: {absoluteIndex})");
|
||||
|
||||
InventoryMoveHelper.HandleItemMovePayload(acceptedPayload, targetPayload);
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ public static class LoggerExtensions
|
||||
{
|
||||
public static void DebugOnly(this object logger, string message)
|
||||
{
|
||||
if(System.Config.General.DebugEnabled) Services.Logger.Debug(message);
|
||||
if(System.Config.General.DebugEnabled) Services.Logger.DebugOnly(message);
|
||||
}
|
||||
|
||||
public static void DebugOnly(this object logger, string message, params object[] args)
|
||||
{
|
||||
if(System.Config.General.DebugEnabled) Services.Logger.Debug(message);
|
||||
if(System.Config.General.DebugEnabled) Services.Logger.DebugOnly(message);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public static class BackupHelper {
|
||||
private const int MaxBackups = 10;
|
||||
private const string Name = "AetherBags";
|
||||
public static void DoConfigBackup(IDalamudPluginInterface pluginInterface) {
|
||||
Services.Logger.Debug("Backup configuration start.");
|
||||
Services.Logger.DebugOnly("Backup configuration start.");
|
||||
try {
|
||||
var configDirectory = pluginInterface.ConfigDirectory;
|
||||
if (!configDirectory.Exists) {
|
||||
|
||||
@@ -12,7 +12,7 @@ public static unsafe class InventoryMoveHelper
|
||||
{
|
||||
public static void MoveItem(InventoryType sourceContainer, ushort sourceSlot, InventoryType destContainer, ushort destSlot)
|
||||
{
|
||||
Services.Logger.Debug($"[MoveItem] {sourceContainer}@{sourceSlot} -> {destContainer}@{destSlot}");
|
||||
Services.Logger.DebugOnly($"[MoveItem] {sourceContainer}@{sourceSlot} -> {destContainer}@{destSlot}");
|
||||
InventoryManager.Instance()->MoveItemSlot(sourceContainer, sourceSlot, destContainer, destSlot, true);
|
||||
Services.Framework.DelayTicks(2);
|
||||
Services.Framework.RunOnFrameworkThread(System.AddonInventoryWindow.ManualRefresh);
|
||||
@@ -31,7 +31,7 @@ public static unsafe class InventoryMoveHelper
|
||||
|
||||
if (srcContainer == 0 || dstContainer == 0) return;
|
||||
|
||||
Services.Logger.Debug($"[MoveItemViaAgent] {srcContainer}:{srcSlot}:{srcRi} -> {dstContainer}:{dstSlot}:{dstRi}");
|
||||
Services.Logger.DebugOnly($"[MoveItemViaAgent] {srcContainer}:{srcSlot}:{srcRi} -> {dstContainer}:{dstSlot}:{dstRi}");
|
||||
|
||||
var atkValues = stackalloc AtkValue[4];
|
||||
for (var i = 0; i < 4; i++)
|
||||
|
||||
@@ -37,7 +37,7 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
MoveItemSlotDetour);
|
||||
_moveItemSlotHook.Enable();
|
||||
|
||||
Services.Logger.Debug("MoveItemSlot hooked successfully.");
|
||||
Services.Logger.DebugOnly("MoveItemSlot hooked successfully.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
OpenInventoryDetour);
|
||||
_openInventoryHook.Enable();
|
||||
|
||||
Services.Logger.Debug("OpenInventory hooked successfully.");
|
||||
Services.Logger.DebugOnly("OpenInventory hooked successfully.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
HandleInventoryEventDetour);
|
||||
_handleInventoryEventHook.Enable();
|
||||
|
||||
Services.Logger.Debug("HandleInventoryEvent hooked successfully.");
|
||||
Services.Logger.DebugOnly("HandleInventoryEvent hooked successfully.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
OpenAddonDetour);
|
||||
_openAddonHook.Enable();
|
||||
|
||||
Services.Logger.Debug("OpenAddon hooked successfully.");
|
||||
Services.Logger.DebugOnly("OpenAddon hooked successfully.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -96,8 +96,8 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
//InventoryItem* sourceItem = InventoryManager.Instance()->GetInventorySlot(srcType, srcSlot);
|
||||
//InventoryItem* destItem = InventoryManager.Instance()->GetInventorySlot(dstType, dstSlot);
|
||||
|
||||
Services.Logger.Debug($"[MoveItemSlot Hook] Moving {srcType}@{srcSlot} -> {dstType}@{dstSlot} I Unk: {unk}");
|
||||
//Services.Logger.Debug($"[MoveItemSlot Hook] Moving {srcType}@{srcSlot} ID:{sourceItem->ItemId} -> {dstType}@{dstSlot} ID:{destItem->ItemId} Unk: {unk}");
|
||||
Services.Logger.DebugOnly($"[MoveItemSlot Hook] Moving {srcType}@{srcSlot} -> {dstType}@{dstSlot} I Unk: {unk}");
|
||||
//Services.Logger.DebugOnly($"[MoveItemSlot Hook] Moving {srcType}@{srcSlot} ID:{sourceItem->ItemId} -> {dstType}@{dstSlot} ID:{destItem->ItemId} Unk: {unk}");
|
||||
|
||||
return _moveItemSlotHook!.Original(manager, srcType, srcSlot, dstType, dstSlot, unk);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
/*
|
||||
private void OpenInventoryDetour(UIModule* uiModule, byte type)
|
||||
{
|
||||
Services.Logger.Debug($"[OpenInventory Hook] Opening inventory of type {type}");
|
||||
Services.Logger.DebugOnly($"[OpenInventory Hook] Opening inventory of type {type}");
|
||||
_openInventoryHook?.Original(uiModule, type);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
{
|
||||
for(int i = 0; i < valueCount; i++)
|
||||
{
|
||||
Services.Logger.Debug($"[HandleInventoryEvent Hook] AtkValue[{i}]: Type={atkValue[i].Type}, ToString: {atkValue[i].ToString()} ");
|
||||
Services.Logger.DebugOnly($"[HandleInventoryEvent Hook] AtkValue[{i}]: Type={atkValue[i].Type}, ToString: {atkValue[i].ToString()} ");
|
||||
}
|
||||
_handleInventoryEventHook?.Original(eventInterface, atkValue, valueCount);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public sealed unsafe class InventoryHooks : IDisposable
|
||||
{
|
||||
for(int i = 0; i < valueCount; i++)
|
||||
{
|
||||
Services.Logger.Debug($"[OpenAddon Hook] AtkValue[{i}]: ToString: {values[i].ToString()} ");
|
||||
Services.Logger.DebugOnly($"[OpenAddon Hook] AtkValue[{i}]: ToString: {values[i].ToString()} ");
|
||||
}
|
||||
return _openAddonHook!.Original(thisPtr, addonNameId, valueCount, values, eventInterface, eventKind, parentAddonId, depthLayer);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class AllaganToolsIPC : IDisposable
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Services.Logger.Debug($"Allagan Tools not available: {ex.Message}");
|
||||
Services.Logger.DebugOnly($"Allagan Tools not available: {ex.Message}");
|
||||
IsReady = false;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public class AllaganToolsIPC : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
Services.Logger.Debug($"Refreshed {CachedSearchFilters.Count} Allagan Tools filters, {ItemToFilters.Count} unique items");
|
||||
Services.Logger.DebugOnly($"Refreshed {CachedSearchFilters.Count} Allagan Tools filters, {ItemToFilters.Count} unique items");
|
||||
OnFiltersRefreshed?.Invoke();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -25,7 +25,7 @@ public class WotsItIPC : IDisposable
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Services.Logger.Debug($"WotsIt not available: {ex.Message}");
|
||||
Services.Logger.DebugOnly($"WotsIt not available: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class WotsItIPC : IDisposable
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Services.Logger.Debug($"Failed to register with WotsIt: {ex.Message}");
|
||||
Services.Logger.DebugOnly($"Failed to register with WotsIt: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -288,8 +288,8 @@ public class InventoryCategoryNode : SimpleComponentNode
|
||||
ReferenceIndex = (short)(targetItemInfo.Item.Container.GetInventoryStartIndex + targetItemInfo.VisualLocation.Slot)
|
||||
};
|
||||
|
||||
Services.Logger.Debug($"[OnPayload] ACCEPTED payload: Type={acceptedPayload.Type} Int1={acceptedPayload.Int1} Int2={acceptedPayload.Int2} Ref={acceptedPayload.ReferenceIndex}");
|
||||
Services.Logger.Debug($"[OnPayload] NODE payload: Type={nodePayload.Type} Int1={nodePayload.Int1} Int2={nodePayload.Int2} Ref={nodePayload.ReferenceIndex}");
|
||||
Services.Logger.DebugOnly($"[OnPayload] ACCEPTED payload: Type={acceptedPayload.Type} Int1={acceptedPayload.Int1} Int2={acceptedPayload.Int2} Ref={acceptedPayload.ReferenceIndex}");
|
||||
Services.Logger.DebugOnly($"[OnPayload] NODE payload: Type={nodePayload.Type} Int1={nodePayload.Int1} Int2={nodePayload.Int2} Ref={nodePayload.ReferenceIndex}");
|
||||
|
||||
if (!acceptedPayload.IsValidInventoryPayload || !nodePayload.IsValidInventoryPayload)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user