logger: add option logger.file.color_lines (closes #528, closes #621)

v2.8-utf8proc
Sébastien Helleu 2019-10-02 20:31:47 +02:00
parent e386965aba
commit 70fd722278
25 changed files with 362 additions and 108 deletions

View File

@ -25,6 +25,7 @@ New features::
* api: add modifier "color_encode_ansi" (issue #528)
* irc: add "user" in output of irc_message_parse (issue #136)
* irc: add options irc.color.message_kick and irc.color.reason_kick (issue #683, issue #684)
* logger: add option logger.file.color_lines (issue #528, issue #621)
* script: add options "-ol" and "-il" in command /script to send translated string with list of scripts loaded, display "No scripts loaded" if no scripts are loaded
Bug fixes::

View File

@ -9,7 +9,7 @@
** Standardwert: `+default+`
* [[option_logger.color.backlog_line]] *logger.color.backlog_line*
** Beschreibung: pass:none[Textfarbe in der der Verlaufsspeicher dargestellt werden soll]
** Beschreibung: pass:none[color for backlog lines, used only if the option logger.file.color_lines is off]
** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen
** Standardwert: `+default+`
@ -20,6 +20,12 @@
** Werte: on, off
** Standardwert: `+on+`
* [[option_logger.file.color_lines]] *logger.file.color_lines*
** Beschreibung: pass:none[use ANSI color codes in lines written in log files and display backlog lines with these colors]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_logger.file.flush_delay]] *logger.file.flush_delay*
** Beschreibung: pass:none[Zeit, in Sekunden, die verstreicht bis eine Protokolldatei gesichert wird (0 = Protokolldatei wird unmittelbar gesichert, nachdem eine neue Zeile dargestellt wurde)]
** Typ: integer

View File

@ -9,7 +9,7 @@
** default value: `+default+`
* [[option_logger.color.backlog_line]] *logger.color.backlog_line*
** description: pass:none[color for backlog lines]
** description: pass:none[color for backlog lines, used only if the option logger.file.color_lines is off]
** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** default value: `+default+`
@ -20,6 +20,12 @@
** values: on, off
** default value: `+on+`
* [[option_logger.file.color_lines]] *logger.file.color_lines*
** description: pass:none[use ANSI color codes in lines written in log files and display backlog lines with these colors]
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_logger.file.flush_delay]] *logger.file.flush_delay*
** description: pass:none[number of seconds between flush of log files (0 = write in log files immediately for each line printed)]
** type: integer

View File

@ -9,7 +9,7 @@
** valeur par défaut: `+default+`
* [[option_logger.color.backlog_line]] *logger.color.backlog_line*
** description: pass:none[couleur pour les lignes de l'historique]
** description: pass:none[couleur pour les lignes de l'historique, utilisée seulement si l'option logger.file.color_lines est désactivée]
** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné
** valeur par défaut: `+default+`
@ -20,6 +20,12 @@
** valeurs: on, off
** valeur par défaut: `+on+`
* [[option_logger.file.color_lines]] *logger.file.color_lines*
** description: pass:none[utiliser des codes de couleurs ANSI dans les lignes écrites dans les fichiers de log et afficher les lignes de l'historique avec ces couleurs]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_logger.file.flush_delay]] *logger.file.flush_delay*
** description: pass:none[nombre de secondes entre les "flush" (écriture) dans les fichiers de log (0 = écrire immédiatement dans les fichiers de log pour chaque ligne affichée)]
** type: entier

View File

@ -9,7 +9,7 @@
** valore predefinito: `+default+`
* [[option_logger.color.backlog_line]] *logger.color.backlog_line*
** descrizione: pass:none[colore per la cronologia]
** descrizione: pass:none[color for backlog lines, used only if the option logger.file.color_lines is off]
** tipo: colore
** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** valore predefinito: `+default+`
@ -20,6 +20,12 @@
** valori: on, off
** valore predefinito: `+on+`
* [[option_logger.file.color_lines]] *logger.file.color_lines*
** descrizione: pass:none[use ANSI color codes in lines written in log files and display backlog lines with these colors]
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_logger.file.flush_delay]] *logger.file.flush_delay*
** descrizione: pass:none[numero di secondi tra il flush (scrittura) dei file di log (0 = scrive sui file di log immediatamente per ogni riga stampata)]
** tipo: intero

View File

@ -9,7 +9,7 @@
** デフォルト値: `+default+`
* [[option_logger.color.backlog_line]] *logger.color.backlog_line*
** 説明: pass:none[バックログ行の色]
** 説明: pass:none[color for backlog lines, used only if the option logger.file.color_lines is off]
** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_"
** デフォルト値: `+default+`
@ -20,6 +20,12 @@
** 値: on, off
** デフォルト値: `+on+`
* [[option_logger.file.color_lines]] *logger.file.color_lines*
** 説明: pass:none[use ANSI color codes in lines written in log files and display backlog lines with these colors]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_logger.file.flush_delay]] *logger.file.flush_delay*
** 説明: pass:none[ログファイルをフラッシュする間隔の秒数 (0 = 行が表示されたらすぐにログファイルに書き込み)]
** タイプ: 整数

View File

@ -9,7 +9,7 @@
** domyślna wartość: `+default+`
* [[option_logger.color.backlog_line]] *logger.color.backlog_line*
** opis: pass:none[kolor linii backloga]
** opis: pass:none[color for backlog lines, used only if the option logger.file.color_lines is off]
** typ: kolor
** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie
** domyślna wartość: `+default+`
@ -20,6 +20,12 @@
** wartości: on, off
** domyślna wartość: `+on+`
* [[option_logger.file.color_lines]] *logger.file.color_lines*
** opis: pass:none[use ANSI color codes in lines written in log files and display backlog lines with these colors]
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_logger.file.flush_delay]] *logger.file.flush_delay*
** opis: pass:none[ilość sekund pomiędzy zapisywaniem plików z logami (0 = zapisuj pliki natychmiast po pojawieniu sie każdej nowej linii)]
** typ: liczba

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-05-13 21:31+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9856,9 +9856,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "barva textu pro akce ve vstupní řádce"
#, fuzzy
msgid "color for backlog lines"
msgstr "barva položek, které jsou pryč"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -9866,6 +9867,11 @@ msgstr ""
"automaticky ukládat obsah bufferu do souboru (pokud je zapnuto logování "
"bufferu)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -12911,3 +12917,7 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)"
#, fuzzy
#~ msgid "color for backlog lines"
#~ msgstr "barva položek, které jsou pryč"

View File

@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-09-28 14:39+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -11685,8 +11685,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "Farbe für die letzte Zeile im Verlaufsspeicher"
msgid "color for backlog lines"
msgstr "Textfarbe in der der Verlaufsspeicher dargestellt werden soll"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -11694,6 +11696,11 @@ msgstr ""
"speichert automatisch den Inhalt eines Buffers in eine Datei (sofern das "
"Protokollieren für den Buffer nicht deaktiviert sein sollte)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -15088,3 +15095,6 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
"%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)"
#~ msgid "color for backlog lines"
#~ msgstr "Textfarbe in der der Verlaufsspeicher dargestellt werden soll"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-05-13 21:31+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -10172,8 +10172,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "color para el final de línea del último registro"
msgid "color for backlog lines"
msgstr "color para las líneas del último registro"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -10181,6 +10183,11 @@ msgstr ""
"automáticamente guardar el contenido del buffer a los archivos (al menos que "
"el buffer desactive el registro)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -13194,3 +13201,6 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: no es posible conectarse al transmisor"
#~ msgid "color for backlog lines"
#~ msgstr "color para las líneas del último registro"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"PO-Revision-Date: 2019-09-30 21:41+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-10-02 20:43+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -11408,8 +11408,12 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "couleur pour la ligne de fin de l'historique"
msgid "color for backlog lines"
msgstr "couleur pour les lignes de l'historique"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
"couleur pour les lignes de l'historique, utilisée seulement si l'option "
"logger.file.color_lines est désactivée"
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -11417,6 +11421,13 @@ msgstr ""
"sauve automatiquement le contenu des tampons dans des fichiers (sauf si un "
"tampon désactive le log)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
"utiliser des codes de couleurs ANSI dans les lignes écrites dans les "
"fichiers de log et afficher les lignes de l'historique avec ces couleurs"
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -14782,3 +14793,6 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)"
#~ msgid "color for backlog lines"
#~ msgstr "couleur pour les lignes de l'historique"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-05-13 21:31+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9210,14 +9210,20 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "nevek színe"
#, fuzzy
msgid "color for backlog lines"
msgstr "távollevő felhasználók nevének színe"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
msgstr ""
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -12166,3 +12172,7 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n"
#, fuzzy
#~ msgid "color for backlog lines"
#~ msgstr "távollevő felhasználók nevének színe"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-05-13 21:31+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -10353,8 +10353,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "colore per la riga finale nella cronologia"
msgid "color for backlog lines"
msgstr "colore per la cronologia"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -10362,6 +10364,11 @@ msgstr ""
"salva automaticamente il contenuto dei buffer su file (a meno che un buffer "
"disabiliti il log)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -13414,3 +13421,6 @@ msgstr "%s%s: timeout per \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: impossibile connettersi al mittente"
#~ msgid "color for backlog lines"
#~ msgstr "colore per la cronologia"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-09-22 18:54+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -10983,8 +10983,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "バックログの最終行の色"
msgid "color for backlog lines"
msgstr "バックログ行の色"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -10992,6 +10994,11 @@ msgstr ""
"バッファの内容をファイルに自動的に保存 (バッファのログ保存が無効化されていな"
"い限り)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -14202,3 +14209,6 @@ msgstr "%s%s: \"%s\" のタイムアウト %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: 接続できません: 未定義のエラー (%d)"
#~ msgid "color for backlog lines"
#~ msgstr "バックログ行の色"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-09-22 18:54+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@ -11152,8 +11152,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "kolor linii kończącej backloga"
msgid "color for backlog lines"
msgstr "kolor linii backloga"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -11161,6 +11163,11 @@ msgstr ""
"automatycznie zapisuj zawartość buforów do plików (chyba, że bufor ma "
"wyłączone logowanie)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -14436,3 +14443,6 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)"
#~ msgid "color for backlog lines"
#~ msgstr "kolor linii backloga"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-09-22 18:54+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -10817,8 +10817,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "cor da linha que termina o registo recente"
msgid "color for backlog lines"
msgstr "cor das linhas do registo recente"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -10826,6 +10828,11 @@ msgstr ""
"guardar conteúdo dos buffers automaticamente em ficheiros (exceto se o "
"buffer tenha registo desativado)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -14073,3 +14080,6 @@ msgstr "%s%s: tempo limite de \"%s\" com %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar: erro inesperado (%d)"
#~ msgid "color for backlog lines"
#~ msgstr "cor das linhas do registo recente"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-05-13 21:32+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9658,9 +9658,10 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "cor para o apelido na barra de entrada"
#, fuzzy
msgid "color for backlog lines"
msgstr "cor de texto para valores"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
@ -9668,6 +9669,11 @@ msgstr ""
"salvar automaticamente o conteúdo dos buffers em arquivos (exceto quando o "
"buffer desabilitar o registro)"
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -12643,3 +12649,7 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar ao remetente"
#, fuzzy
#~ msgid "color for backlog lines"
#~ msgstr "cor de texto para valores"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-05-13 21:32+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9246,14 +9246,20 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr "цвет ников"
#, fuzzy
msgid "color for backlog lines"
msgstr "цвет отошедших ников"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
msgstr ""
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
@ -12198,3 +12204,7 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: не могу соединиться с отправителем\n"
#, fuzzy
#~ msgid "color for backlog lines"
#~ msgstr "цвет отошедших ников"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2019-05-13 21:32+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -8413,13 +8413,20 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr ""
msgid "color for backlog lines"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
msgstr ""
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-09-27 18:18+0200\n"
"POT-Creation-Date: 2019-10-02 20:42+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -8275,13 +8275,20 @@ msgstr ""
msgid "color for line ending the backlog"
msgstr ""
msgid "color for backlog lines"
msgid ""
"color for backlog lines, used only if the option logger.file.color_lines is "
"off"
msgstr ""
msgid ""
"automatically save content of buffers to files (unless a buffer disables log)"
msgstr ""
msgid ""
"use ANSI color codes in lines written in log files and display backlog lines "
"with these colors"
msgstr ""
msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"

View File

@ -110,13 +110,15 @@ void
logger_backlog (struct t_gui_buffer *buffer, const char *filename, int lines)
{
struct t_logger_line *last_lines, *ptr_lines;
char *charset, *pos_message, *pos_tab, *error, *message;
char *charset, *pos_message, *pos_tab, *error, *message, *message2;
time_t datetime, time_now;
struct tm tm_line;
int num_lines;
int color_lines, num_lines;
weechat_buffer_set (buffer, "print_hooks_enabled", "0");
color_lines = weechat_config_boolean (logger_config_file_color_lines);
num_lines = 0;
last_lines = logger_tail_file (filename, lines);
ptr_lines = last_lines;
@ -145,26 +147,35 @@ logger_backlog (struct t_gui_buffer *buffer, const char *filename, int lines)
}
pos_message = (pos_message && (datetime != 0)) ?
pos_message + 1 : ptr_lines->data;
charset = weechat_info_get ("charset_terminal", "");
message = (charset) ?
weechat_iconv_to_internal (charset, pos_message) : strdup (pos_message);
if (charset)
free (charset);
message = weechat_hook_modifier_exec (
"color_decode_ansi",
(color_lines) ? "1" : "0",
pos_message);
if (message)
{
pos_tab = strchr (message, '\t');
if (pos_tab)
pos_tab[0] = '\0';
weechat_printf_date_tags (buffer, datetime,
"no_highlight,notify_none,logger_backlog",
"%s%s%s%s%s",
weechat_color (weechat_config_string (logger_config_color_backlog_line)),
message,
(pos_tab) ? "\t" : "",
(pos_tab) ? weechat_color (weechat_config_string (logger_config_color_backlog_line)) : "",
(pos_tab) ? pos_tab + 1 : "");
if (pos_tab)
pos_tab[0] = '\t';
charset = weechat_info_get ("charset_terminal", "");
message2 = (charset) ?
weechat_iconv_to_internal (charset, message) : strdup (message);
if (charset)
free (charset);
if (message2)
{
pos_tab = strchr (message2, '\t');
if (pos_tab)
pos_tab[0] = '\0';
weechat_printf_date_tags (
buffer, datetime,
"no_highlight,notify_none,logger_backlog",
"%s%s%s%s%s",
(color_lines) ? "" : weechat_color (weechat_config_string (logger_config_color_backlog_line)),
message2,
(pos_tab) ? "\t" : "",
(pos_tab && !color_lines) ? weechat_color (weechat_config_string (logger_config_color_backlog_line)) : "",
(pos_tab) ? pos_tab + 1 : "");
if (pos_tab)
pos_tab[0] = '\t';
free (message2);
}
free (message);
}
num_lines++;

View File

@ -46,6 +46,7 @@ struct t_config_option *logger_config_color_backlog_line;
/* logger config, file section */
struct t_config_option *logger_config_file_auto_log;
struct t_config_option *logger_config_file_color_lines;
struct t_config_option *logger_config_file_flush_delay;
struct t_config_option *logger_config_file_fsync;
struct t_config_option *logger_config_file_info_lines;
@ -76,6 +77,31 @@ logger_config_change_file_option_restart_log (const void *pointer, void *data,
logger_adjust_log_filenames ();
}
/*
* Callback for changes on option "logger.file.color_lines".
*/
void
logger_config_color_lines_change (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
if (logger_config_loading)
return;
if (logger_hook_print)
weechat_unhook (logger_hook_print);
logger_hook_print = weechat_hook_print (
NULL, NULL, NULL,
(weechat_config_boolean (logger_config_file_color_lines)) ? 0 : 1,
&logger_print_cb, NULL, NULL);
}
/*
* Callback for changes on option "logger.file.flush_delay".
*/
@ -92,7 +118,7 @@ logger_config_flush_delay_change (const void *pointer, void *data,
if (logger_config_loading)
return;
if (logger_timer)
if (logger_hook_timer)
{
if (weechat_logger_plugin->debug)
{
@ -100,8 +126,8 @@ logger_config_flush_delay_change (const void *pointer, void *data,
NULL, 0, "no_log",
"%s: stopping timer", LOGGER_PLUGIN_NAME);
}
weechat_unhook (logger_timer);
logger_timer = NULL;
weechat_unhook (logger_hook_timer);
logger_hook_timer = NULL;
}
if (weechat_config_integer (logger_config_file_flush_delay) > 0)
@ -114,9 +140,10 @@ logger_config_flush_delay_change (const void *pointer, void *data,
LOGGER_PLUGIN_NAME,
weechat_config_integer (logger_config_file_flush_delay));
}
logger_timer = weechat_hook_timer (weechat_config_integer (logger_config_file_flush_delay) * 1000,
0, 0,
&logger_timer_cb, NULL, NULL);
logger_hook_timer = weechat_hook_timer (
weechat_config_integer (logger_config_file_flush_delay) * 1000,
0, 0,
&logger_timer_cb, NULL, NULL);
}
}
@ -435,7 +462,8 @@ logger_config_init ()
logger_config_color_backlog_line = weechat_config_new_option (
logger_config_file, ptr_section,
"backlog_line", "color",
N_("color for backlog lines"),
N_("color for backlog lines, used only if the option "
"logger.file.color_lines is off"),
NULL, -1, 0, "default", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
@ -461,6 +489,15 @@ logger_config_init ()
"disables log)"),
NULL, 0, 0, "on", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
logger_config_file_color_lines = weechat_config_new_option (
logger_config_file, ptr_section,
"color_lines", "boolean",
N_("use ANSI color codes in lines written in log files and display "
"backlog lines with these colors"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL,
&logger_config_color_lines_change, NULL, NULL,
NULL, NULL, NULL);
logger_config_file_flush_delay = weechat_config_new_option (
logger_config_file, ptr_section,
"flush_delay", "integer",

View File

@ -30,6 +30,7 @@ extern struct t_config_option *logger_config_color_backlog_end;
extern struct t_config_option *logger_config_color_backlog_line;
extern struct t_config_option *logger_config_file_auto_log;
extern struct t_config_option *logger_config_file_color_lines;
extern struct t_config_option *logger_config_file_flush_delay;
extern struct t_config_option *logger_config_file_fsync;
extern struct t_config_option *logger_config_file_info_lines;
@ -44,6 +45,8 @@ extern struct t_config_option *logger_config_file_time_format;
extern struct t_config_option *logger_config_get_level (const char *name);
extern int logger_config_set_level (const char *name, const char *value);
extern struct t_config_option *logger_config_get_mask (const char *name);
extern void logger_config_color_lines_change (const void *pointer, void *data,
struct t_config_option *option);
extern int logger_config_init ();
extern int logger_config_read ();
extern int logger_config_write ();

View File

@ -51,7 +51,8 @@ WEECHAT_PLUGIN_PRIORITY(14000);
struct t_weechat_plugin *weechat_logger_plugin = NULL;
struct t_hook *logger_timer = NULL; /* timer to flush log files */
struct t_hook *logger_hook_timer = NULL; /* timer to flush log files */
struct t_hook *logger_hook_print = NULL;
/*
@ -610,7 +611,7 @@ logger_write_line (struct t_logger_buffer *logger_buffer,
if (message)
free (message);
logger_buffer->flush_needed = 1;
if (!logger_timer)
if (!logger_hook_timer)
{
fflush (logger_buffer->log_file);
if (weechat_config_boolean (logger_config_file_fsync))
@ -1007,8 +1008,9 @@ logger_print_cb (const void *pointer, void *data,
{
struct t_logger_buffer *ptr_logger_buffer;
struct tm *date_tmp;
char buf_time[256];
int line_log_level, prefix_is_nick;
char buf_time[256], *prefix_ansi, *message_ansi;
const char *ptr_prefix, *ptr_message;
int line_log_level, prefix_is_nick, color_lines;
/* make C compiler happy */
(void) pointer;
@ -1018,32 +1020,56 @@ logger_print_cb (const void *pointer, void *data,
logger_get_line_tag_info (tags_count, tags, &line_log_level,
&prefix_is_nick);
if (line_log_level >= 0)
{
ptr_logger_buffer = logger_buffer_search_buffer (buffer);
if (ptr_logger_buffer
&& ptr_logger_buffer->log_enabled
&& (date > 0)
&& (line_log_level <= ptr_logger_buffer->log_level))
{
buf_time[0] = '\0';
date_tmp = localtime (&date);
if (date_tmp)
{
if (strftime (buf_time, sizeof (buf_time) - 1,
weechat_config_string (logger_config_file_time_format),
date_tmp) == 0)
buf_time[0] = '\0';
}
if (line_log_level < 0)
return WEECHAT_RC_OK;
logger_write_line (ptr_logger_buffer,
"%s\t%s%s%s\t%s",
buf_time,
(prefix && prefix_is_nick) ? weechat_config_string (logger_config_file_nick_prefix) : "",
(prefix) ? prefix : "",
(prefix && prefix_is_nick) ? weechat_config_string (logger_config_file_nick_suffix) : "",
message);
ptr_logger_buffer = logger_buffer_search_buffer (buffer);
if (ptr_logger_buffer
&& ptr_logger_buffer->log_enabled
&& (date > 0)
&& (line_log_level <= ptr_logger_buffer->log_level))
{
prefix_ansi = NULL;
message_ansi = NULL;
color_lines = weechat_config_boolean (logger_config_file_color_lines);
if (color_lines)
{
prefix_ansi = weechat_hook_modifier_exec ("color_encode_ansi",
NULL, prefix);
message_ansi = weechat_hook_modifier_exec ("color_encode_ansi",
NULL, message);
ptr_prefix = prefix_ansi;
ptr_message = message_ansi;
}
else
{
ptr_prefix = prefix;
ptr_message = message;
}
buf_time[0] = '\0';
date_tmp = localtime (&date);
if (date_tmp)
{
if (strftime (buf_time, sizeof (buf_time) - 1,
weechat_config_string (logger_config_file_time_format),
date_tmp) == 0)
buf_time[0] = '\0';
}
logger_write_line (
ptr_logger_buffer,
"%s\t%s%s%s\t%s%s",
buf_time,
(ptr_prefix && prefix_is_nick) ? weechat_config_string (logger_config_file_nick_prefix) : "",
(ptr_prefix) ? ptr_prefix : "",
(ptr_prefix && prefix_is_nick) ? weechat_config_string (logger_config_file_nick_suffix) : "",
(color_lines) ? "\x1B[0m" : "",
ptr_message);
if (prefix_ansi)
free (prefix_ansi);
if (message_ansi)
free (message_ansi);
}
return WEECHAT_RC_OK;
@ -1103,7 +1129,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_signal ("day_changed",
&logger_day_changed_signal_cb, NULL, NULL);
weechat_hook_print (NULL, NULL, NULL, 1, &logger_print_cb, NULL, NULL);
logger_config_color_lines_change (NULL, NULL, NULL);
logger_info_init ();
@ -1120,10 +1146,16 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* make C compiler happy */
(void) plugin;
if (logger_timer)
if (logger_hook_print)
{
weechat_unhook (logger_timer);
logger_timer = NULL;
weechat_unhook (logger_hook_print);
logger_hook_print = NULL;
}
if (logger_hook_timer)
{
weechat_unhook (logger_hook_timer);
logger_hook_timer = NULL;
}
logger_config_write ();

View File

@ -30,7 +30,8 @@ struct t_logger_buffer;
extern struct t_weechat_plugin *weechat_logger_plugin;
extern struct t_hook *logger_timer;
extern struct t_hook *logger_hook_timer;
extern struct t_hook *logger_hook_print;
extern char *logger_build_option_name (struct t_gui_buffer *buffer);
extern void logger_set_log_filename (struct t_logger_buffer *logger_buffer);
@ -38,6 +39,11 @@ extern void logger_start_buffer_all (int write_info_line);
extern void logger_flush ();
extern void logger_stop_all (int write_info_line);
extern void logger_adjust_log_filenames ();
extern int logger_print_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer, time_t date,
int tags_count, const char **tags,
int displayed, int highlight,
const char *prefix, const char *message);
extern int logger_timer_cb (const void *pointer, void *data,
int remaining_calls);