File indexing completed on 2024-05-12 05:48:37
0001 /* 0002 SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "cupsAccessItemBuilder.h" 0008 0009 QString CupsAccessItemBuilder::createFormattedText(LogLine *line) const 0010 { 0011 QString result; 0012 0013 QListIterator<QString> it(line->logItems()); 0014 0015 result.append(QLatin1String("<table>")); 0016 0017 result.append(labelMessageFormat(i18n("Date:"), formatDate(line->time()))); 0018 result.append(labelMessageFormat(i18n("Level:"), line->logLevel()->name())); 0019 result.append(labelMessageFormat(i18n("Hostname:"), it.next())); 0020 result.append(labelMessageFormat(i18n("Identification:"), it.next())); 0021 result.append(labelMessageFormat(i18n("Username:"), it.next())); 0022 result.append(labelMessageFormat(i18n("HTTP Response:"), it.next())); 0023 result.append(labelMessageFormat(i18n("Bytes Sent:"), it.next())); 0024 0025 result.append(QLatin1String("</table>")); 0026 0027 return result; 0028 }