]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 调整日志
authorqydysky <qydysky@foxmail.com>
Sun, 9 Apr 2023 17:58:59 +0000 (01:58 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 9 Apr 2023 17:58:59 +0000 (01:58 +0800)
Reply/F.go
Reply/stream.go

index 39ad905a22f3ae85b98713824ea67bd45454efe5..626cdb6cf3e0b76ec7f080c041319047c0084edd 100644 (file)
@@ -11,7 +11,6 @@ import (
        "math"
        "net/http"
        "net/http/pprof"
-       "path/filepath"
        "sort"
        "strconv"
        "strings"
@@ -205,12 +204,8 @@ func Ass_f(contextC context.Context, save_path string, filePath string, st time.
        if filePath == "" {
                return
        }
-       fl := c.C.Log.Base(`Ass`)
-       if rel, err := filepath.Rel(save_path, ass.file); err == nil {
-               fl.L(`I: `, "保存到", rel+".ass")
-       } else {
-               fl.L(`W: `, err)
-       }
+       fl := flog.Base_add(`Ass`)
+       fl.L(`I: `, `开始`)
        f := &file.File{
                Config: file.Config{
                        FilePath:  ass.file + ".ass",
@@ -1447,17 +1442,17 @@ func StartRecDanmu(c context.Context, filePath string) {
        if !IsOn(`仅保存当前直播间流`) || !IsOn("弹幕回放") {
                return
        }
-       f := flog.Base("弹幕回放")
+       f := flog.Base_add("弹幕回放")
        var Recoder = websocket.Recorder{
                Server: StreamWs,
        }
        if e := Recoder.Start(filePath); e == nil {
-               f.L(`T: `, `开始`)
+               f.L(`I: `, `开始`)
        } else {
                f.L(`E: `, e)
        }
        <-c.Done()
-       flog.Base("弹幕回放").L(`T: `, `停止`)
+       f.L(`I: `, `结束`)
        Recoder.Stop()
 }
 
index fa8ce8b61f961f701cdcbbe441ccea229f6ab985..692925cd72b42a3dd9d96caf5a3f4eaac5f022b1 100644 (file)
@@ -1157,13 +1157,13 @@ func (t *M4SStream) Start() bool {
                                                return true
                                        })
 
-                                       l := ms.log.Base_add(`文件`)
+                                       l := ms.log.Base_add(`文件保存`)
                                        startf := func(_ *M4SStream) error {
-                                               l.L(`T: `, `start`)
+                                               l.L(`T: `, `开始`)
                                                return nil
                                        }
                                        stopf := func(_ *M4SStream) error {
-                                               l.L(`T: `, `stop`)
+                                               l.L(`T: `, `结束`)
                                                return nil
                                        }
                                        ms.getSavepath()