[issue30995] Support logging.getLogger(style='{')

2017-09-24 Thread Steven Warwick

Steven Warwick added the comment:

sorry, I meant the following:

logger.info( " {:s} {:s} ".format(logger.name, logger.module ) )

or 

logger.info( f" {logger.name:s} {logger.module:s} " ) 

this could be supported with full backward compatibility with very little 
effort.   

Am I missing something?

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30995>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30995] Support logging.getLogger(style='{')

2017-09-24 Thread Steven Warwick

Steven Warwick added the comment:

you probably have already considered this, but I just wanted to ask if it might 
be worth considering turning the problem "upside down" to make things easier.

  I'm interpreting the problem that there are variables we'd like to add to the 
output log that are provided inside the logger, which is why we need to use a 
specific type of format string to make sure you add them correctly.   If 
instead, these same variables are simply exposed as logger attributes, we could 
just create the complete formatted string when we call the logger.  

logger.info( " {:s} {:s} ", logger.name, logger.module ) 

does this make any sense?

--
nosy: +sdwarwick

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30995>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com