exc_info is exception tuple not intended to be printed. It's using to
generate output by logging.Formatter().formatException() instead.
exc_text used to cache this output. So we use handler formatter to get
string from exc_info and send it as EXCEPTION_INFO. EXCEPTION_TEXT is
kept for backward compatibility.
Also adds type validation for journal.send fields to unit tests. Known
types could be gotten from journal.DEFAULT_CONVERTERS. The rest payload
must be either a string or bytes.
Change-Id: Idc0b9edc61b4ec39dc9df0ea8282cc104e4d83c0
Closes-Bug: 1802142
(cherry picked from commit a2956d7ff08f7657dc68c78f860bcc9eb2e5a8fb)
Reviewed: https:/ /review. opendev. org/749189 /git.openstack. org/cgit/ openstack/ oslo.log/ commit/ ?id=7b39c0bdf3a 52d66df363de288 4434204a8efe3f
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 7b39c0bdf3a52d6 6df363de2884434 204a8efe3f
Author: Nikita Gerasimov <email address hidden>
Date: Thu Nov 8 19:26:03 2018 +0300
Fix handling of exc_info in OSJournalHandler
exc_info is exception tuple not intended to be printed. It's using to Formatter( ).formatExcepti on() instead.
generate output by logging.
exc_text used to cache this output. So we use handler formatter to get
string from exc_info and send it as EXCEPTION_INFO. EXCEPTION_TEXT is
kept for backward compatibility.
Also adds type validation for journal.send fields to unit tests. Known DEFAULT_ CONVERTERS. The rest payload
types could be gotten from journal.
must be either a string or bytes.
Change-Id: Idc0b9edc61b4ec 39dc9df0ea8282c c104e4d83c0 7dc68c78f860bcc 9eb2e5a8fb)
Closes-Bug: 1802142
(cherry picked from commit a2956d7ff08f765