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:
@@ -1,6 +1,6 @@
|
||||
|
||||
const MODULE_ID = "gowlers-tracking-ledger";
|
||||
const MODULE_VERSION = "0.1.20";
|
||||
const MODULE_VERSION = "0.1.21";
|
||||
const TRACK_SETTING = "actorSettings";
|
||||
const FLAG_SCOPE = "world";
|
||||
const MAX_HISTORY_ROWS = 100;
|
||||
@@ -419,10 +419,15 @@ async function initializeModule() {
|
||||
// Log detailed inspection for debugging
|
||||
console.log("[GowlersTracking] Message inspection for damage details:");
|
||||
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.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 {
|
||||
types: damageTypes.length > 0 ? damageTypes : null,
|
||||
isCritical,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"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.",
|
||||
"version": "0.1.20",
|
||||
"version": "0.1.21",
|
||||
"authors": [
|
||||
{ "name": "Gowler", "url": "https://foundryvtt.com" }
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user