Skip to content

Add action logger#773

Open
Wavy77 wants to merge 1 commit into
mindcraft-bots:developfrom
Wavy77:pr-action-logger
Open

Add action logger#773
Wavy77 wants to merge 1 commit into
mindcraft-bots:developfrom
Wavy77:pr-action-logger

Conversation

@Wavy77
Copy link
Copy Markdown

@Wavy77 Wavy77 commented May 12, 2026

This PR adds an optional action logger for structured bot action logs.

The logger records successful block and item actions when action_logging is enabled in settings.js. It is disabled by default and is intended to help debug bot behavior without changing normal bot execution.

Included changes:

  • Add action_logger.js
  • Add action logging settings
  • Add settings UI spec entries
  • Integrate logging into skills.js
  • Add ACTION_LOGGING.md documentation

This PR intentionally excludes unrelated experimental features such as neural networks, replay execution, causal DAG logic, and broader agent architecture changes.

Comment thread settings.js
"spawn_timeout": 30, // num seconds allowed for the bot to spawn before throwing error. Increase when spawning takes a while.
"block_place_delay": 0, // delay between placing blocks (ms) if using newAction. helps avoid bot being kicked by anti-cheat mechanisms on servers.
"action_logging": false, // when true, write structured ACTION logs for successful bot block/item actions.
"action_log_file_prefix": "andy_log", // prefix for action log files in ./bots/<bot>/logs/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be hard coded. Or just use log by default. Maybe also with a timestamp.

**/
if (x == null || y == null || z == null) throw new Error('Invalid position to break block at.');
let block = bot.blockAt(Vec3(x, y, z));
const targetCoord = new Vec3(Math.floor(x), Math.floor(y), Math.floor(z));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Irrelevant for PR scope?

Comment thread ACTION_LOGGING.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not important enough to have its own file. Consider moving to README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants