Ticket #13363: 0002-Read-WriteStringList-Increase-length-of-debug-output.patch

File 0002-Read-WriteStringList-Increase-length-of-debug-output.patch, 1.8 KB (added by ijc, 14 months ago)
  • mythtv/libs/libmythbase/mythsocket.cpp

    From 67521cc22f932e3b791193b98b86d3593d2dc8ce Mon Sep 17 00:00:00 2001
    From: Ian Campbell <ijc@hellion.org.uk>
    Date: Sat, 22 Dec 2018 13:53:44 +0000
    Subject: [PATCH 2/2] Read,WriteStringList: Increase length of debug output
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    I found that 85 characters wasn't enough for my debugging use. Bump the limit
    to 128 and save a few extra bytes by using a UTF-8 elipsis ("
") rather than
    three dots.
    
    Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
    ---
     mythtv/libs/libmythbase/mythsocket.cpp | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/mythtv/libs/libmythbase/mythsocket.cpp b/mythtv/libs/libmythbase/mythsocket.cpp
    index c4dfd7258e..80e57bca4c 100644
    a b void MythSocket::WriteStringListReal(const QStringList *list, bool *ret) 
    749749        QString msg = QString("write -> %1 %2")
    750750            .arg(m_tcpSocket->socketDescriptor(), 2).arg(payload.data());
    751751
    752         if (logLevel < LOG_DEBUG && msg.length() > 88)
     752        if (logLevel < LOG_DEBUG && msg.length() > 128)
    753753        {
    754             msg.truncate(85);
    755             msg += "...";
     754            msg.truncate(127);
     755            msg += "
";
    756756        }
    757757        LOG(VB_NETWORK, LOG_INFO, LOC + msg);
    758758    }
    void MythSocket::ReadStringListReal( 
    950950            .arg(m_tcpSocket->socketDescriptor(), 2)
    951951            .arg(payload.data());
    952952
    953         if (logLevel < LOG_DEBUG && msg.length() > 88)
     953        if (logLevel < LOG_DEBUG && msg.length() > 128)
    954954        {
    955             msg.truncate(85);
    956             msg += "...";
     955            msg.truncate(127);
     956            msg += "
";
    957957        }
    958958        LOG(VB_NETWORK, LOG_INFO, LOC + msg);
    959959    }