Skip to content

Default the bot's log level to info and read log_level from the profile - #113

Merged
valzargaming merged 1 commit into
mainfrom
claude/bot-log-level
Nov 17, 2026
Merged

valzargaming merged 1 commit into
mainfrom
claude/bot-log-level

Conversation

@valzargaming

Copy link
Copy Markdown
Member

Requested by Val · project thread

Change

The bot logged at debug unconditionally. It now resolves its level at start from the portable profile's optional top-level log_level, then the LOG_LEVEL environment value, then info. The Civ13 launcher's Civilizationbot tab (launcher 1.5.30) sets log_level. Accepted values: debug, info, notice, warning, error (case and spaces ignored). An unknown value logs a warning and uses info, so it never blocks boot. Civ13 class fallback loggers also default to info. The bot logs a Log level: ... notice right after boot.

  • src/Civ13/LogLevelSetting.php (new, pure), required next to the other early bootstrap classes in bot.php.
  • Fixtures in tests/windows/bootstrap.php and tests/windows/default-branch.php copy the new file.
  • tests/local/log-level.php added to the local-profile workflow; docs in docs/windows-test1714.md.

Verification

PHP 8.3, after composer install --no-dev --no-plugins --no-scripts: php tests/local/log-level.php, tests/windows/bootstrap.php, default-branch.php, portable.php, constructor.php (+ --negative-control), lock-path-guard.php, hosted-verifier.php, tests/local/run.php, adminlist-files.php, access-list-sync.php all pass. constructor.php --cache-negative-control fails the same way on main in this container (root user). Monolog Level::fromName checked for all five names. Not run live.


Generated by Claude Code

The launcher's Civilizationbot tab can now set the portable profile's
log_level (debug, info, notice, warning, error); LOG_LEVEL in the
environment is the fallback, then info. An unknown value logs a warning
and uses info, so it never stops the bot from starting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WTP2RCuxRvGvvpCDsWSAZ
Copilot AI balanced review requested due to automatic review settings November 17, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@valzargaming valzargaming self-assigned this Nov 17, 2026
@valzargaming
valzargaming merged commit ddd797c into main Nov 17, 2026
72 of 73 checks passed

Copy link
Copy Markdown
Member Author

2026-11-17: Merged after the local offline suites in the PR body passed (log-level, bootstrap, default-branch, portable, constructor, run.php and others). Launcher side is Civ13/Civ13#5931 (1.5.30). Not verified live: the running bot on the host picks this up after Update and a restart.


Generated by Claude Code

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.

3 participants