mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-11 17:47:20 +10:00
Fix panic when closing Box before Start with file log output
This commit is contained in:
@@ -40,6 +40,7 @@ func New(options Options) (Factory, error) {
|
|||||||
case "stdout":
|
case "stdout":
|
||||||
logWriter = os.Stdout
|
logWriter = os.Stdout
|
||||||
default:
|
default:
|
||||||
|
logWriter = io.Discard
|
||||||
logFilePath = logOptions.Output
|
logFilePath = logOptions.Output
|
||||||
}
|
}
|
||||||
logFormatter := Formatter{
|
logFormatter := Formatter{
|
||||||
|
|||||||
Reference in New Issue
Block a user