top-think / top-think/think-orm

Db::setLog($log);报错

Open
#364 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
437
Forks
188
PR merge metrics
No merged PRs in 30d

Description

Psr\Log\LoggerInterface 没有定义LEVEL:sql

所以setlog报错。

level:sql不是psr定义level,希望orm组件能遵循psr定义。或者orm处理好兼容问题。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Db::setLog($log) and inspect how the ORM sends the sql level to Psr\Log\LoggerInterface. Confirm the PSR-defined levels and determine whether the ORM should use one of them or provide compatibility handling; done means setLog no longer errors when SQL logging is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.