You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/07/16 02:56:47 UTC

[GitHub] [rocketmq-client-go] UnderTreeTech commented on a change in pull request #508: support set log output path

UnderTreeTech commented on a change in pull request #508:
URL: https://github.com/apache/rocketmq-client-go/pull/508#discussion_r455479658



##########
File path: rlog/log.go
##########
@@ -115,6 +117,17 @@ func (l *defaultLogger) Level(level string) {
 	}
 }
 
+func (l *defaultLogger) OutputPath(path string) (err error) {
+	var file *os.File
+	file, err = os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
+	if err != nil {
+		return

Review comment:
       Has already return err. err is defined in the api definition.
   ```go
   func (l *defaultLogger) OutputPath(path string) (err error)
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org