Seebs wrote:
On 2011-08-23, Roy Smith <r...@panix.com> wrote:
I want to log a string but only the first bunch of it, and add "..."
to the end if it got truncated.  This certainly works:

          logger.error("FAILED: '%s{50}', '%s', %s, %s" % (message,
route, params, e.code))

does anything like this exist?

%.50s

That's not working in 2.7 or 3.2.

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to