debug: enhance logging to show full metadata and HTML content for damage analysis

- Log full metadata object (JSON stringified) to see all available fields
- Log first 1000 chars of message.content (HTML) to analyze damage type information
- This will help identify where damage types (Fire, Slashing, etc.) are stored

Update version to 0.1.21

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
centron\schwoerer
2025-11-20 15:09:02 +01:00
parent 26a9a7fb08
commit faef3badfe
2 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
const MODULE_ID = "gowlers-tracking-ledger"; const MODULE_ID = "gowlers-tracking-ledger";
const MODULE_VERSION = "0.1.20"; const MODULE_VERSION = "0.1.21";
const TRACK_SETTING = "actorSettings"; const TRACK_SETTING = "actorSettings";
const FLAG_SCOPE = "world"; const FLAG_SCOPE = "world";
const MAX_HISTORY_ROWS = 100; const MAX_HISTORY_ROWS = 100;
@@ -419,10 +419,15 @@ async function initializeModule() {
// Log detailed inspection for debugging // Log detailed inspection for debugging
console.log("[GowlersTracking] Message inspection for damage details:"); console.log("[GowlersTracking] Message inspection for damage details:");
console.log("[GowlersTracking] - pf1Flags keys:", Object.keys(pf1Flags)); console.log("[GowlersTracking] - pf1Flags keys:", Object.keys(pf1Flags));
console.log("[GowlersTracking] - metadata:", metadata); console.log("[GowlersTracking] - Full metadata:", JSON.stringify(metadata, null, 2));
console.log("[GowlersTracking] - message.rolls:", message.rolls?.length > 0 ? "Present" : "None"); console.log("[GowlersTracking] - message.rolls:", message.rolls?.length > 0 ? "Present" : "None");
console.log("[GowlersTracking] - message.content length:", message.content?.length ?? 0); console.log("[GowlersTracking] - message.content length:", message.content?.length ?? 0);
// Log HTML content snippet for analysis
if (message.content) {
console.log("[GowlersTracking] - HTML preview (first 1000 chars):", message.content.substring(0, 1000));
}
return { return {
types: damageTypes.length > 0 ? damageTypes : null, types: damageTypes.length > 0 ? damageTypes : null,
isCritical, isCritical,

View File

@@ -3,7 +3,7 @@
"type": "module", "type": "module",
"title": "Gowler's Tracking Ledger", "title": "Gowler's Tracking Ledger",
"description": "Adds HP/XP/Currency log buttons to PF1 sheets and opens the tracking dialog preloaded with the actor's logs.", "description": "Adds HP/XP/Currency log buttons to PF1 sheets and opens the tracking dialog preloaded with the actor's logs.",
"version": "0.1.20", "version": "0.1.21",
"authors": [ "authors": [
{ "name": "Gowler", "url": "https://foundryvtt.com" } { "name": "Gowler", "url": "https://foundryvtt.com" }
], ],