logger: add option logger.file.fsync (closes #1145)

v2.8-utf8proc
Sébastien Helleu 2018-02-10 08:23:47 +01:00
parent 1bd8998d07
commit 710db5dbcd
23 changed files with 163 additions and 19 deletions

View File

@ -26,6 +26,7 @@ New features::
* core: add option weechat.completion.partial_completion_templates to force partial completion on specific templates
* api: add hashtable with variables in plugin structure
* irc: add server option "split_msg_max_length"
* logger: add option logger.file.fsync (issue #1145)
* logger: add option logger.look.backlog_conditions (issue #1132)
* scripts: add configuration file for each script plugin (_python.conf_, _perl.conf_, ...)
* scripts: add "eval" option in script commands and info "xxx_eval" (python, perl, ruby, lua and guile) (issue #128)

View File

@ -26,6 +26,12 @@
** Werte: 0 .. 3600
** Standardwert: `+120+`
* [[option_logger.file.fsync]] *logger.file.fsync*
** Beschreibung: pass:none[use fsync to synchronize the log file with the storage device after the flush (see man fsync); this is slower but should prevent any data loss in case of power failure during the save of log file]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_logger.file.info_lines]] *logger.file.info_lines*
** Beschreibung: pass:none[fügt eine Information in die Protokoll-Datei ein, wenn die Protokollierung gestartet oder beendet wird]
** Typ: boolesch

View File

@ -26,6 +26,12 @@
** values: 0 .. 3600
** default value: `+120+`
* [[option_logger.file.fsync]] *logger.file.fsync*
** description: pass:none[use fsync to synchronize the log file with the storage device after the flush (see man fsync); this is slower but should prevent any data loss in case of power failure during the save of log file]
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_logger.file.info_lines]] *logger.file.info_lines*
** description: pass:none[write information line in log file when log starts or ends for a buffer]
** type: boolean

View File

@ -26,6 +26,12 @@
** valeurs: 0 .. 3600
** valeur par défaut: `+120+`
* [[option_logger.file.fsync]] *logger.file.fsync*
** description: pass:none[utiliser fsync pour synchroniser le fichier de log avec le périphérique de stockage après le flush (voir man fsync) ; cela est plus lent mais devrait éviter toute perte de données en cas de panne de courant durant la sauvegarde du fichier de log]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_logger.file.info_lines]] *logger.file.info_lines*
** description: pass:none[écrire une ligne d'information dans le fichier log quand le log démarre ou se termine pour un tampon]
** type: booléen

View File

@ -26,6 +26,12 @@
** valori: 0 .. 3600
** valore predefinito: `+120+`
* [[option_logger.file.fsync]] *logger.file.fsync*
** descrizione: pass:none[use fsync to synchronize the log file with the storage device after the flush (see man fsync); this is slower but should prevent any data loss in case of power failure during the save of log file]
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_logger.file.info_lines]] *logger.file.info_lines*
** descrizione: pass:none[scrive una riga informativa nel file di log quando il log inizia o termina per un buffer]
** tipo: bool

View File

@ -26,6 +26,12 @@
** 値: 0 .. 3600
** デフォルト値: `+120+`
* [[option_logger.file.fsync]] *logger.file.fsync*
** 説明: pass:none[use fsync to synchronize the log file with the storage device after the flush (see man fsync); this is slower but should prevent any data loss in case of power failure during the save of log file]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_logger.file.info_lines]] *logger.file.info_lines*
** 説明: pass:none[バッファのログ保存の開始時と終了時にログファイルへ情報行を書き込む]
** タイプ: ブール

View File

@ -26,6 +26,12 @@
** wartości: 0 .. 3600
** domyślna wartość: `+120+`
* [[option_logger.file.fsync]] *logger.file.fsync*
** opis: pass:none[use fsync to synchronize the log file with the storage device after the flush (see man fsync); this is slower but should prevent any data loss in case of power failure during the save of log file]
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_logger.file.info_lines]] *logger.file.info_lines*
** opis: pass:none[zapisuje informacje w pliku z logami o rozpoczęciu i zakończeniu logowania buforu]
** typ: bool

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9801,6 +9801,12 @@ msgid ""
"immediately for each line printed)"
msgstr ""
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"zapsat informační řádek do logovacího souboru při spuštění nebo skončení pro "

View File

@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-07 21:36+0100\n"
"Last-Translator: w8rabbit <w8rabbit@mail.i2p>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -6461,10 +6461,10 @@ msgid ""
" /exec -kill 0"
msgstr ""
" -list: zeigt laufende Befehle an\n"
" -sh: es wird die shell verwendet um Befehle auszuführen, mehrere Befehle"
" können dabei gepiped werden (WARNUNG: "
"Dieses Argument sollte nur verwendet werden, falls alle Argumente "
"unbedenklich sind, siehe Argument -nosh)\n"
" -sh: es wird die shell verwendet um Befehle auszuführen, mehrere "
"Befehle können dabei gepiped werden (WARNUNG: Dieses Argument sollte nur "
"verwendet werden, falls alle Argumente unbedenklich sind, siehe Argument -"
"nosh)\n"
" -nosh: die shell wird nicht verwendet um Befehle auszuführen (wird "
"benötigt, falls der Befehl mit sensiblen Daten hantiert. Zum Beispiel der "
"Inhalt einer Nachricht eines anderen Users)(Standardverhalten)\n"
@ -11597,6 +11597,17 @@ msgstr ""
"= Protokolldatei wird unmittelbar gesichert, nachdem eine neue Zeile "
"dargestellt wurde)"
#, fuzzy
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
"es wird fsync verwendet um die Konfigurationsdateien mit dem Datenträger zu "
"synchronisieren (siehe man fsync); dies verlangsamt das Sichern der Daten, "
"soll aber zum Beispiel bei einem Stromausfall dafür sorgen, dass keine Daten "
"verloren gehen"
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"fügt eine Information in die Protokoll-Datei ein, wenn die Protokollierung "
@ -14491,4 +14502,3 @@ 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)"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -10126,6 +10126,12 @@ msgstr ""
"número de segundos entre escritura de los archivos de registro (0 = escribir "
"los archivos inmediatamente por cada línea)"
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"escribir una línea informativa en el registro cuando el registro empieza o "

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"PO-Revision-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-10 08:21+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -11322,6 +11322,16 @@ msgstr ""
"(0 = écrire immédiatement dans les fichiers de log pour chaque ligne "
"affichée)"
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
"utiliser fsync pour synchroniser le fichier de log avec le périphérique de "
"stockage après le flush (voir man fsync) ; cela est plus lent mais devrait "
"éviter toute perte de données en cas de panne de courant durant la "
"sauvegarde du fichier de log"
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"écrire une ligne d'information dans le fichier log quand le log démarre ou "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9159,6 +9159,12 @@ msgid ""
"immediately for each line printed)"
msgstr ""
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
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: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -10310,6 +10310,12 @@ msgstr ""
"numero di secondi tra il flush (scrittura) dei file di log (0 = scrive sui "
"file di log immediatamente per ogni riga stampata)"
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"scrive una riga informativa nel file di log quando il log inizia o termina "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -10893,6 +10893,16 @@ msgstr ""
"ログファイルをフラッシュする間隔の秒数 (0 = 行が表示されたらすぐにログファイ"
"ルに書き込み)"
#, fuzzy
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
"メモリ上の設定内容をストレージデバイス上のものと同期させるには fsync を使って"
"ください (man fsync を参照してください); fsync は遅いですが、fsync を使えば設"
"定ファイル保存中の停電によるデータ損失を避けられます"
msgid "write information line in log file when log starts or ends for a buffer"
msgstr "バッファのログ保存の開始時と終了時にログファイルへ情報行を書き込む"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -11078,6 +11078,16 @@ msgstr ""
"ilość sekund pomiędzy zapisywaniem plików z logami (0 = zapisuj pliki "
"natychmiast po pojawieniu sie każdej nowej linii)"
#, fuzzy
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
"użyj fsync do synchronizacji konfiguracji na zewnętrznym nośniku (zobacz man "
"fsync); jest to wolniejsze ale powinno zapobiec utracie danych w przypadku "
"zaniku napięcia podczas zapisu danych konfiguracyjnych"
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"zapisuje informacje w pliku z logami o rozpoczęciu i zakończeniu logowania "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -10769,6 +10769,12 @@ msgstr ""
"número de segundos entre escrita (flush) dos ficheiros de registo (0 = "
"escrever nos ficheiros de registo imediatamente depois de imprimir uma linha)"
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"escrever linha de informação no ficheiro de registo quando o registo de um "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9617,6 +9617,12 @@ msgstr ""
"número de segundos entre a gravação dos arquivos de registro (0 = escrever "
"no arquivo de registro imediatamente para cada linha impressa)"
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""
"escrever linha de informação no arquivo de registro quando o registro "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9196,6 +9196,12 @@ msgid ""
"immediately for each line printed)"
msgstr ""
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
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: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -8355,6 +8355,12 @@ msgid ""
"immediately for each line printed)"
msgstr ""
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-07 19:58+0100\n"
"POT-Creation-Date: 2018-02-10 08:21+0100\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"
@ -8237,6 +8237,12 @@ msgid ""
"immediately for each line printed)"
msgstr ""
msgid ""
"use fsync to synchronize the log file with the storage device after the "
"flush (see man fsync); this is slower but should prevent any data loss in "
"case of power failure during the save of log file"
msgstr ""
msgid "write information line in log file when log starts or ends for a buffer"
msgstr ""

View File

@ -47,6 +47,7 @@ struct t_config_option *logger_config_color_backlog_line;
struct t_config_option *logger_config_file_auto_log;
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;
struct t_config_option *logger_config_file_mask;
struct t_config_option *logger_config_file_name_lower_case;
@ -469,6 +470,15 @@ logger_config_init ()
NULL, NULL, NULL,
&logger_config_flush_delay_change, NULL, NULL,
NULL, NULL, NULL);
logger_config_file_fsync = weechat_config_new_option (
logger_config_file, ptr_section,
"fsync", "boolean",
N_("use fsync to synchronize the log file with the storage device "
"after the flush (see man fsync); this is slower but should "
"prevent any data loss in case of power failure during the save of "
"log file"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
logger_config_file_info_lines = weechat_config_new_option (
logger_config_file, ptr_section,
"info_lines", "boolean",

View File

@ -31,6 +31,7 @@ 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_flush_delay;
extern struct t_config_option *logger_config_file_fsync;
extern struct t_config_option *logger_config_file_info_lines;
extern struct t_config_option *logger_config_file_mask;
extern struct t_config_option *logger_config_file_name_lower_case;

View File

@ -844,6 +844,8 @@ logger_flush ()
ptr_logger_buffer->log_filename);
}
fflush (ptr_logger_buffer->log_file);
if (weechat_config_boolean (logger_config_file_fsync))
fsync (fileno (ptr_logger_buffer->log_file));
ptr_logger_buffer->flush_needed = 0;
}
}