mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 19:59:37 -06:00
Skipping regex path removal.
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -19,10 +18,6 @@ import (
|
||||
|
||||
var (
|
||||
RequestIDString = "request-id"
|
||||
|
||||
// Match all paths outside of ocis. Will break if path does not include '/ocis/',
|
||||
// but this is intended for debugging purposes.
|
||||
pathRegex = regexp.MustCompile(`.*/ocis/`)
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -78,7 +73,6 @@ type LineInfoHook struct{}
|
||||
func (h LineInfoHook) Run(e *zerolog.Event, l zerolog.Level, msg string) {
|
||||
_, file, line, ok := runtime.Caller(3)
|
||||
if ok {
|
||||
file := pathRegex.ReplaceAllString(file, "")
|
||||
e.Str("line", fmt.Sprintf("%s:%d", file, line))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user