mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 04:31:52 +08:00
refactor(logging): 统一日志前缀,删除废弃的 LogBase
- 删除 LogBase 函数,所有调用迁移到 LogInfo/LogError - 新增 PrefixDebug ([.]) 前缀,所有日志级别现在都有前缀 - 修复日志输出缩进不一致的问题 - 删除未使用的 PrefixDefault 常量
This commit is contained in:
@@ -49,7 +49,7 @@ func (p *Socks5ProxyPlugin) Scan(ctx context.Context, info *common.HostInfo, con
|
||||
output.WriteString(fmt.Sprintf("监听端口: %d\n", port))
|
||||
output.WriteString(fmt.Sprintf("平台: %s\n\n", runtime.GOOS))
|
||||
|
||||
common.LogBase(i18n.Tr("socks5_starting", port))
|
||||
common.LogInfo(i18n.Tr("socks5_starting", port))
|
||||
|
||||
// 启动SOCKS5代理服务器
|
||||
err := p.startSocks5Server(ctx, port, state)
|
||||
@@ -96,7 +96,7 @@ func (p *Socks5ProxyPlugin) startSocks5Server(ctx context.Context, port int, sta
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
common.LogBase(i18n.GetText("socks5_cancelled"))
|
||||
common.LogInfo(i18n.GetText("socks5_cancelled"))
|
||||
return ctx.Err()
|
||||
default:
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user