Skip to content

Add logger package documentation#7

Open
alexstandiford wants to merge 1 commit into
mainfrom
docs/logger-package
Open

Add logger package documentation#7
alexstandiford wants to merge 1 commit into
mainfrom
docs/logger-package

Conversation

@alexstandiford
Copy link
Copy Markdown
Contributor

Documents the phpnomad/logger package, which provides a logging abstraction layer.

Includes:

  • LoggerStrategy interface
  • CanLogException trait
  • Usage examples and integration guide

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Documents the phpnomad/logger package, which provides a logging abstraction layer.

Includes:
- LoggerStrategy interface
- CanLogException trait
- Usage examples and integration guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 984eb55335

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +78 to +82
Exception $e,
string $message = '',
array $context = [],
string $level = null
): mixed;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align logException return types with CanLogException

The docs define LoggerStrategy::logException() with a mixed return type, but the CanLogException trait documentation shows the method with no return type at all. In PHP, a class implementing LoggerStrategy and using that trait (as shown in the examples) would fail interface compatibility because the trait’s method signature doesn’t declare the required return type. If logException(): mixed is truly required, the trait and examples need to include that return type; otherwise the interface signature should omit it. This mismatch will cause a fatal error when users follow the documented approach.

Useful? React with 👍 / 👎.

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.

1 participant