You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "Jedore (via GitHub)" <gi...@apache.org> on 2023/02/02 13:33:02 UTC

[GitHub] [skywalking] Jedore opened a new issue, #10334: [Feature] [Python] Add log reporter support for loguru

Jedore opened a new issue, #10334:
URL: https://github.com/apache/skywalking/issues/10334

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   I use [loguru](https://github.com/Delgan/loguru) to log in python program.  But, python agent log reporter can't catch loguru's log.
   
   ### Use case
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: notifications-unsubscribe@skywalking.apache.org.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416830343

   > And don't hurry, take your time. @Jedore
   
   Got it.  👌 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1417837243

   I have done, but my env(poetry) in trouble from adding loguru to pyproject.toml. 😢 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] wu-sheng commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1413801283

   Are you going to contribute this?


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1413817309

   > Are you going to contribute this?
   
   Yeah, i will contribute this featue.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414738489

   > > > @Superskyyy Would we consider this in 1.0 or 1.1? I feel we pushed further for 1.0 in months.
   > > 
   > > 
   > > Depends on @Jedore's speed, I'm aiming a vote this weekend. This change will be quite small but multiple users have asked if I remember correctly.
   > 
   > I will try to make it as fast as i can. 👨‍💻
   
   Thanks! 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore closed issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore closed issue #10334: [Feature] [Python] Add log reporter support for loguru
URL: https://github.com/apache/skywalking/issues/10334


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414275625

   Great! Since loggers are used through out user applications and other packages, please make sure to thoroughly test (and provide new e2e tests) when enhancing the feature.
   
   The current logging interceptor only instruments the built-in logging.py, so you need to modify the structure/configurations a bit. 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] wu-sheng commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414518645

   Got it. Thanks.
   
   I can see 3 left in https://github.com/apache/skywalking/issues/9939 Do you plan to finish these two as well?


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416668210

   Ok,i got it. Thanks.@Superskyyy 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] wu-sheng commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414535883

   Thanks. I just want to make sure milestone is accurate.
   Look forwars to the 1.0


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416652627

   About feature, I would follow these steps:
   1. Create a `sw_loguru` module in `skywalking.log` package. 
   2. Move `sw_logging.transform` function to `log.formatter` module.
   3. Move `build_log_tags` function from  `sw_logging` to `log.formatter` module.
   
   Is there anything inappropriate ?
   And I will think about test part a little latter. 
   Hope for your suggestion. @Superskyyy 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] wu-sheng commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414494056

   @Superskyyy Would we consider this in 1.0 or 1.1?
   I feel we pushed further for 1.0 in months.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416662376

   > About feature, I would follow these steps:
   > 
   > 1. Create a `sw_loguru` module in `skywalking.log` package.
   > 2. Move `sw_logging.transform` function to `log.formatter` module.
   > 3. Move `build_log_tags` function from  `sw_logging` to `log.formatter` module.
   > 
   > Is there anything inappropriate ? And I will think about test part a little latter. Hope for your suggestion. @Superskyyy
   
   That sounds great. I guess the other important thing is to see if loguru and sw_logging can co-exist, if they produce duplicated results you will need to provide a configuration to disable one of them. I don't know how lorugu works though.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414487799

   > Great! Since loggers are used through out user applications and other packages, please make sure to thoroughly test (and provide new e2e tests) when enhancing the feature.
   > 
   > The current logging interceptor only instruments the built-in logging.py, so you need to modify the structure/configurations a bit. 
   
   Thanks for tips.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414516625

   > > @Superskyyy Would we consider this in 1.0 or 1.1? I feel we pushed further for 1.0 in months.
   > 
   > Depends on @Jedore's speed, I'm aiming a vote this weekend. Since this change will be quite small but multiple users have asked if I remember correctly.
   
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416652586

   About feature, I would follow these steps:
   1. Create a `sw_loguru` module in `skywalking.log` package. 
   2. Move `sw_logging.transform` function to `log.formatter` module.
   3. Move `build_log_tags` function from  `sw_logging` to `log.formatter` module.
   
   Is there anything inappropriate ?
   And I will think about test part a little latter. 
   Hope for your suggestion. @Superskyyy 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416822844

   Now, it's a little complex. `loguru`'s logic/structure are not like `logging`, and `loguru` has different versions different log parameters. So i would put `sw_loguru` into `plugins` package and make individual functions for it. `loguru` and `logging` can coexist, they have different entries and exits, so there would not be duplicated logs. 
   
   And I'm a little puzzled about e2e test. Can you make a brief introduction and how to run e2e test on my computer ?
   Thanks very much. @Superskyyy  


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Jedore commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Jedore (via GitHub)" <gi...@apache.org>.
Jedore commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414736851

   > > @Superskyyy Would we consider this in 1.0 or 1.1? I feel we pushed further for 1.0 in months.
   > 
   > Depends on @Jedore's speed, I'm aiming a vote this weekend. This change will be quite small but multiple users have asked if I remember correctly.
   
   I will try to make it as fast as i can. 👨‍💻 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414516314

   > @Superskyyy Would we consider this in 1.0 or 1.1? I feel we pushed further for 1.0 in months.
   
   Depends on @Jedore's speed, I'm aiming a vote this weekend. 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1414523963

   > Got it. Thanks.
   > 
   > I can see 3 left in #9939 Do you plan to finish these two as well?
   
   Yes it's coming very soon. I actually already finished the code two months ago as a huge PR. Yet I kept finding other bugs from the agent and covid thing so it was blocked until recently. :| 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416825070

   Hi, it's okay that you put it into plug-ins folder due to the version differences. 
   
   As to e2e tests, it's perfectly normal to be confused at first glance. Let me walk you through it.
   
   ... unfinished be right back. 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] Superskyyy commented on issue #10334: [Feature] [Python] Add log reporter support for loguru

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10334:
URL: https://github.com/apache/skywalking/issues/10334#issuecomment-1416829883

   And don't hurry, take your time. @Jedore 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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