[issue26606] logging.baseConfig is missing the encoding parameter

2017-11-19 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-03 Thread Jānis Šlapiņš
Jānis Šlapiņš added the comment: > that's why I'm choosing not to increase the complexity of my code I disagree about the classification of my proposal. This is not about increasing the complexity (changing algorithms, adding a new functionality and so on). It is just about getting the most

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-01 Thread Vinay Sajip
Vinay Sajip added the comment: > and almost no one shows how to use the stream. Because most examples out there don't care about Unicode, etc. > I understand the redirection in the following way (also shown in the Dive > Into Python book) There's certainly no need to do that, and that would

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-01 Thread Jānis Šlapiņš
Jānis Šlapiņš added the comment: Many examples in the internet only show the usage of the filename parameter of basicConfig() and almost no one shows how to use the stream. That's why I wanted to use the filename parameter. But now I tested other options and they work for me. My case may be

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-01 Thread Vinay Sajip
Vinay Sajip added the comment: > you have also to remember to restore sys.stdout I'm not sure you understand how it works. The value of sys.stdout isn't changed, so why does it need to be restored? > for non-English languages it would be more appropriate to use codecs.open() > instead of

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-01 Thread Jānis Šlapiņš
Jānis Šlapiņš added the comment: Yes, it also works. But then you have also to remember to restore sys.stdout to the initial state at the end. In addition, for non-English languages it would be more appropriate to use codecs.open() instead of just open() in this case. The complexity of the

[issue26606] logging.baseConfig is missing the encoding parameter

2016-03-31 Thread Vinay Sajip
Vinay Sajip added the comment: > requires much more coding Much more? How so? It just seems like one open() call and passing the result to basicConfig(). -- ___ Python tracker

[issue26606] logging.baseConfig is missing the encoding parameter

2016-03-31 Thread Jānis Šlapiņš
Jānis Šlapiņš added the comment: Using the stream or other options requires much more coding (for example, an additional redirection of sys.stdout to a file) instead of just one line with the basicConfig. In the meanwhile, I tried to use logging.FileHandler instead where I could specify the

[issue26606] logging.baseConfig is missing the encoding parameter

2016-03-29 Thread Vinay Sajip
Vinay Sajip added the comment: But you can open a stream using the encoding you want and pass it as the stream= parameter to basicConfig(). Why does that not work for you? -- ___ Python tracker

[issue26606] logging.baseConfig is missing the encoding parameter

2016-03-22 Thread SilentGhost
Changes by SilentGhost : -- nosy: +vinay.sajip stage: -> patch review ___ Python tracker ___

[issue26606] logging.baseConfig is missing the encoding parameter

2016-03-21 Thread Jānis Šlapiņš
New submission from Jānis Šlapiņš: Hi! Log files are only saved using the system default encoding. On Windows, this means that the current ANSI code page is used. This may lead to a disaster (exceptions may be thrown due to unmappable characters) if you want to log particular text strings in a