[issue36532] Example of logging.formatter with new str.format style

2019-04-06 Thread spaceman_spiff


spaceman_spiff  added the comment:

I was under the impression that this was all it takes to use loggers with the 
normal string.format syntax.
e.g.:
   log.info('{}', 'Test')
Turns out when I tested it I used f-strings in the first parameters - so I got 
it wrong.
Imho this can be closed and the pr rejected.
Sorry for wasting your time :)

--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36532] Example of logging.formatter with new str.format style

2019-04-05 Thread Fred L. Drake, Jr.


Fred L. Drake, Jr.  added the comment:

Good catch, Vinay!  Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36532] Example of logging.formatter with new str.format style

2019-04-05 Thread Vinay Sajip


Vinay Sajip  added the comment:

But there is an example in the cookbook already:

https://docs.python.org/3/howto/logging-cookbook.html#use-of-alternative-formatting-styles

It's right there in the first code sample in that section.

You might want to amend your change to point to this section from the one where 
you want to make the change.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36532] Example of logging.formatter with new str.format style

2019-04-05 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip
versions:  -Python 3.5, Python 3.6, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread Fred L. Drake, Jr.


Change by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +12618
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread spaceman_spiff


Change by spaceman_spiff :


--
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread spaceman_spiff


New submission from spaceman_spiff :

It was not quite clear how to use the logging library with the new str.format 
style so I added an example in the logging cookbook

--
assignee: docs@python
components: Documentation
messages: 339470
nosy: docs@python, spaceman_spiff
priority: normal
severity: normal
status: open
title: Example of logging.formatter with new str.format style
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com