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/06 07:16:28 UTC

[GitHub] [rocketmq-client-go] UnderTreeTech opened a new pull request #508: support set log output path

UnderTreeTech opened a new pull request #508:
URL: https://github.com/apache/rocketmq-client-go/pull/508


   ## What is the purpose of the change
   
   user can customize mq client log output path.
   


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



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

Posted by GitBox <gi...@apache.org>.
liangyuanpeng commented on a change in pull request #508:
URL: https://github.com/apache/rocketmq-client-go/pull/508#discussion_r455162910



##########
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:
       Maybe should `return err`




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



[GitHub] [rocketmq-client-go] vongosling merged pull request #508: support set log output path

Posted by GitBox <gi...@apache.org>.
vongosling merged pull request #508:
URL: https://github.com/apache/rocketmq-client-go/pull/508


   


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



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

Posted by GitBox <gi...@apache.org>.
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