source/gproxy.cpp
/**
 * Prints the logMessage to the gproxy log file, if logging is enabled.
 *
 * @param logMessage The log message.
 * @param printTimestamp If the current time should be displayed before the message. Default: <code>true</code>.
 * @param lineBreak If a line break should be appended to the message. Default: <code>true</code>.
 */
Prints the logMessage to the gproxy log file, if logging is enabled.

@param logMessage The log message.
@param printTimestamp If the current time should be displayed before the message. Default: true.
@param lineBreak If a line break should be appended to the message. Default: true.
Prints the logMessage to the gproxy log file if logging is enabled . @param logMessage The log message . @param printTimestamp If the current time should be displayed before the message . Default : true . @param lineBreak If a line break should be appended to the message . Default : true .
void LOG_Print (const QString& logMessage, bool printTimestamp, bool lineBreak)
{
    if (logFilePtr->isOpen() && logFilePtr->isWritable())
    {
        QTextStream log(logFilePtr);
        if (printTimestamp)
        {
            QString dateTime = QLocale().toString(QDateTime::currentDateTime(),
                    "[dddd dd-MM-yyyy hh:mm:ss] ");
            log << dateTime;
        }
        log << logMessage;
        if (lineBreak)
        {
            log << "\n";
        }
        log.flush();
    }
}
void LOG_Print ( const QString & logMessage , bool printTimestamp , bool lineBreak ) { if ( logFilePtr -> isOpen ( ) && logFilePtr -> isWritable ( ) ) { QTextStream log ( logFilePtr ) ; if ( printTimestamp ) { QString dateTime = QLocale ( ) . toString ( QDateTime :: currentDateTime ( ) , " " ) ; log << dateTime ; } log << logMessage ; if ( lineBreak ) { log << " \n " ; } log . flush ( ) ; } }
Prints the logMessage to the gproxy log file, if logging is enabled.
Prints the logMessage to the gproxy log file if logging is enabled .
// If logging is disabled the log file is closed.
