fix(captcha/dnsdial): начать DI-миграцию package-level логгеров
captcha.Solve теперь принимает явный параметр logx.Logger, и captchaSession использует его внутри; package-level переменная Log и SetLogger сохранены, но помечены deprecated. auto_solver.go обновлён, чтобы передавать captcha.Log в Solve, сохраняя текущую обвязку до полного DI-прохода. manual и dnsdial: SetLogger и Log помечены deprecated с пояснением для будущей struct-based DI; поведение не изменено.
This commit is contained in:
1 parent
ef549dc2b8
commit
5735b4a297
4 files changed
+46
-18
No files matched your search
@@ -35,9 +35,14 @@ var Debug bool
|
||||
|
||||
// Log is the package-level logger; defaults to no-op. main wires it via
|
||||
// SetLogger so manual-captcha output respects -debug and levels.
|
||||
//
|
||||
// Deprecated: future refactoring should inject the logger via a Solver struct.
|
||||
// SetLogger remains for backward compatibility.
|
||||
var Log logx.Logger = logx.Nop()
|
||||
|
||||
// SetLogger installs a logger for this package.
|
||||
//
|
||||
// Deprecated: prefer a Solver struct with an explicit Logger field.
|
||||
func SetLogger(l logx.Logger) { Log = logx.OrNop(l) }
|
||||
|
||||
const captchaListenPort = "8765"
|
||||
|
||||
Reference in new issue
Block a user