klesh commented on code in PR #2656:
URL: https://github.com/apache/incubator-devlake/pull/2656#discussion_r942051599


##########
logger/logger.go:
##########
@@ -75,32 +95,84 @@ func (l *DefaultLogger) Error(format string, a 
...interface{}) {
        l.Log(core.LOG_ERROR, format, a...)
 }
 
-// bind two writer to logger
-func (l *DefaultLogger) Nested(name string) core.Logger {
-       writerStd := os.Stdout
-       fileName := ""
-       loggerPrefixRegex := regexp.MustCompile(`(\[task #\d+]\s\[\w+])`)
-       groups := loggerPrefixRegex.FindStringSubmatch(fmt.Sprintf("%s [%s]", 
l.prefix, name))
-       if len(groups) > 1 {
-               fileName = groups[1]
+func (l *DefaultLogger) Nested(newPrefix string, config ...*core.LoggerConfig) 
core.Logger {

Review Comment:
   No, I don't. Nested should return a new instance inherites the `Stream` from 
the original one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to