Ejemplo n.º 1
0
	QDebug RollingFileAppender::debug(QDebug &rDebug) const
	{
	    QString layout_name;
	    if (layout())
	        layout_name = layout()->name();
	    QString codec_name;
	    if (encoding())
	        codec_name = QLatin1String(encoding()->name());
	    
	    rDebug.nospace() << "RollingFileAppender(" 
	        << "name:" << name() << " "
	        << "appendfile:" << appendFile() << " "
	        << "bufferedio:" << bufferedIo() << " "
	        << "encoding:" << codec_name << " "
	        << "file:" << file() << " "
	        << "filter:" << firstFilter() << " "
	        << "immediateflush:" << immediateFlush() << " "
	        << "isactive:" << isActive() << " "
	        << "isclosed:" << isClosed() << " "
	        << "layout:" << layout_name << " "
	        << "maxbackupindex:" << maxBackupIndex() << " "
	        << "maximumfilesize:" << maximumFileSize() << " "
	        << "referencecount:" << referenceCount() << " "
	        << "threshold:" << threshold().toString() << " "
	        << "writer:" << writer()
	        << ")";
	    return rDebug.space();    
	}
Ejemplo n.º 2
0
	QDebug DailyRollingFileAppender::debug(QDebug &rDebug) const
	{
	    QString layout_name;
	    if (layout())
	        layout_name = layout()->name();
	    QString codec_name;
	    if (encoding())
	        codec_name = QLatin1String(encoding()->name());
	    
	    rDebug.nospace() << "DailyRollingFileAppender(" 
	        << "name:" << name() << " "
	        << "activedatepattern:" << mActiveDatePattern << " "
	        << "appendfile:" << appendFile() << " " 
	        << "bufferedio:" << bufferedIo() << " "
	        << "datepattern:" << datePattern() << " "
	        << "encoding:" << codec_name << " "
	        << "frequency:" << frequencyToString() << " "
            << "file:" << fileName() << " "
            << "filepath:" << filePath() << " "
            << "suffix:" << suffix() << " "
            << "fullFileName:" << fullFileName() << " "
	        << "filter:" << firstFilter() << " "        
	        << "immediateflush:" << immediateFlush() << " "
	        << "isactive:" << isActive() << " "
	        << "isclosed:" << isClosed() << " "
	        << "layout:" << layout_name << " "
	        << "referencecount:" << referenceCount() << " "
	        << "rollovertime:" << mRollOverTime
	        << "threshold:" << threshold().toString()
	        << "writer:" << writer()
	        << ")";
	    return rDebug.space();    
	}
Ejemplo n.º 3
0
void TelnetAppender::append(const LoggingEvent &rEvent)
{
    // Q_ASSERT_X(, "TelnetAppender::append()", "Lock must be held by caller");
    Q_ASSERT_X(layout(), "TelnetAppender::append()", "Layout must not be null");

    QString message(layout()->format(rEvent));

    Q_FOREACH (QTcpSocket * pClientConnection, mTcpSockets)
    {
        pClientConnection->write(message.toLocal8Bit().constData());
        if (immediateFlush())
            pClientConnection->flush();
    }