mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-26 20:29:03 +03:00
Merge tag 'v1.13.14' into extended
Integrate upstream sing-box v1.13.14 (18 commits, v1.13.12..v1.13.14). Conflict resolutions: - Makefile: keep fork's upload_android (no otherLegacy, codeberg-release.sh), add upstream's SFA-version-metadata.json step. - go.sum: regenerated via go mod tidy from merged go.mod. - transport/wireguard/endpoint_options.go: keep fork fields, add ICMPTimeout. - clients/android, clients/apple: keep fork's submodule pointers.
This commit is contained in:
@@ -111,23 +111,13 @@ type observableLogger struct {
|
||||
|
||||
func (l *observableLogger) Log(ctx context.Context, level Level, args []any) {
|
||||
level = OverrideLevelFromContext(level, ctx)
|
||||
if level > l.level && l.platformWriter == nil {
|
||||
if level > l.level && l.platformWriter == nil && !l.needObservable {
|
||||
return
|
||||
}
|
||||
nowTime := time.Now()
|
||||
if level <= l.level {
|
||||
if l.needObservable {
|
||||
message, messageSimple := l.formatter.FormatWithSimple(ctx, level, l.tag, F.ToString(args...), nowTime)
|
||||
if level == LevelPanic {
|
||||
panic(message)
|
||||
}
|
||||
l.writer.Write([]byte(message))
|
||||
if level == LevelFatal {
|
||||
os.Exit(1)
|
||||
}
|
||||
l.subscriber.Emit(Entry{level, messageSimple})
|
||||
} else {
|
||||
message := l.formatter.Format(ctx, level, l.tag, F.ToString(args...), nowTime)
|
||||
if l.needObservable {
|
||||
message, messageSimple := l.formatter.FormatWithSimple(ctx, level, l.tag, F.ToString(args...), nowTime)
|
||||
if level <= l.level {
|
||||
if level == LevelPanic {
|
||||
panic(message)
|
||||
}
|
||||
@@ -136,6 +126,16 @@ func (l *observableLogger) Log(ctx context.Context, level Level, args []any) {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
l.subscriber.Emit(Entry{level, messageSimple})
|
||||
} else if level <= l.level {
|
||||
message := l.formatter.Format(ctx, level, l.tag, F.ToString(args...), nowTime)
|
||||
if level == LevelPanic {
|
||||
panic(message)
|
||||
}
|
||||
l.writer.Write([]byte(message))
|
||||
if level == LevelFatal {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
if l.platformWriter != nil {
|
||||
l.platformWriter.WriteMessage(level, l.platformFormatter.Format(ctx, level, l.tag, F.ToString(args...), nowTime))
|
||||
|
||||
Reference in New Issue
Block a user