[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: There is another problem: PySys_WriteStderr is faster than your gc_log, which can potentially slow down heavy GC-based programs, even if the file descriptor is not used. -- ___ Python tracker

[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: There are several problems with this change: 1) The lifetime of the file descriptor. The file descriptor is borrowed, which normally will lead to not being properly cleaned upon failure or interpreter deallocation. 2) The statistics you are trying

[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy
penguin_wwy <940375...@qq.com> added the comment: Sorry, parameter type is `TextIOWrapper`, not `TestIOWrapper` -- ___ Python tracker ___

[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy
penguin_wwy <940375...@qq.com> added the comment: Thank you for the reminder. At first, I wanted to analyze the effectiveness of GC through logs. However, because GC through the stderr output, these logs are mixed in with other output(such as warnings). This make it difficult to handle them

[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for opening this issue..I think you need to elaborate a bit more about this feature you are suggesting. In general we don't allow this kind of facilities to redirect to file stream anywhere else in the interpreter. -- nosy: +pablogsal

[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy
Change by penguin_wwy <940375...@qq.com>: -- keywords: +patch pull_requests: +28077 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29848 ___ Python tracker

[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy
New submission from penguin_wwy <940375...@qq.com>: Set up file stream for redirecting logs by adding a parameter in `set_debug`. The stderr is used by default. -- components: Library (Lib) messages: 407286 nosy: penguin_wwy priority: normal severity: normal status: open title: Set up