Don't include the trace in the actual message, that keeps us from
grouping these messages by type. Instead inject the trace as an
extra parameter we'll pick up in logstash
Change-Id: I48184c1af2560827ef50baff4fc0443f00697504
$msg = __METHOD__ . ': lost connection to {dbserver}; reconnected';
$params = [ 'dbserver' => $this->getServer() ];
$this->connLogger->warning( $msg, $params );
- $this->queryLogger->warning(
- "$msg:\n" . ( new RuntimeException() )->getTraceAsString(),
- $params );
+ $this->queryLogger->warning( $msg, $params +
+ [ 'trace' => ( new RuntimeException() )->getTraceAsString() ] );
if ( !$recoverable ) {
# Callers may catch the exception and continue to use the DB