From 710db5dbcdf10eb7ae449af8ef707f08ba77e89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 10 Feb 2018 08:23:47 +0100 Subject: [PATCH] logger: add option logger.file.fsync (closes #1145) --- ChangeLog.adoc | 1 + doc/de/autogen/user/logger_options.adoc | 6 ++++++ doc/en/autogen/user/logger_options.adoc | 6 ++++++ doc/fr/autogen/user/logger_options.adoc | 6 ++++++ doc/it/autogen/user/logger_options.adoc | 6 ++++++ doc/ja/autogen/user/logger_options.adoc | 6 ++++++ doc/pl/autogen/user/logger_options.adoc | 6 ++++++ po/cs.po | 8 +++++++- po/de.po | 22 ++++++++++++++++------ po/es.po | 8 +++++++- po/fr.po | 14 ++++++++++++-- po/hu.po | 8 +++++++- po/it.po | 8 +++++++- po/ja.po | 12 +++++++++++- po/pl.po | 12 +++++++++++- po/pt.po | 8 +++++++- po/pt_BR.po | 8 +++++++- po/ru.po | 8 +++++++- po/tr.po | 8 +++++++- po/weechat.pot | 8 +++++++- src/plugins/logger/logger-config.c | 10 ++++++++++ src/plugins/logger/logger-config.h | 1 + src/plugins/logger/logger.c | 2 ++ 23 files changed, 163 insertions(+), 19 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 70a0b1621..2e19f733b 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -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) diff --git a/doc/de/autogen/user/logger_options.adoc b/doc/de/autogen/user/logger_options.adoc index 638ad3cdf..a684e6edb 100644 --- a/doc/de/autogen/user/logger_options.adoc +++ b/doc/de/autogen/user/logger_options.adoc @@ -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 diff --git a/doc/en/autogen/user/logger_options.adoc b/doc/en/autogen/user/logger_options.adoc index 9657012c2..0a39c5aa2 100644 --- a/doc/en/autogen/user/logger_options.adoc +++ b/doc/en/autogen/user/logger_options.adoc @@ -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 diff --git a/doc/fr/autogen/user/logger_options.adoc b/doc/fr/autogen/user/logger_options.adoc index c84604110..c93be11f5 100644 --- a/doc/fr/autogen/user/logger_options.adoc +++ b/doc/fr/autogen/user/logger_options.adoc @@ -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 diff --git a/doc/it/autogen/user/logger_options.adoc b/doc/it/autogen/user/logger_options.adoc index 1c283250b..3519f52b6 100644 --- a/doc/it/autogen/user/logger_options.adoc +++ b/doc/it/autogen/user/logger_options.adoc @@ -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 diff --git a/doc/ja/autogen/user/logger_options.adoc b/doc/ja/autogen/user/logger_options.adoc index 172539769..e29bd24d3 100644 --- a/doc/ja/autogen/user/logger_options.adoc +++ b/doc/ja/autogen/user/logger_options.adoc @@ -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[バッファのログ保存の開始時と終了時にログファイルへ情報行を書き込む] ** タイプ: ブール diff --git a/doc/pl/autogen/user/logger_options.adoc b/doc/pl/autogen/user/logger_options.adoc index 619a901ec..db2532d74 100644 --- a/doc/pl/autogen/user/logger_options.adoc +++ b/doc/pl/autogen/user/logger_options.adoc @@ -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 diff --git a/po/cs.po b/po/cs.po index e558898d4..f0275fc5e 100644 --- a/po/cs.po +++ b/po/cs.po @@ -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 \n" "Language-Team: weechat-dev \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 " diff --git a/po/de.po b/po/de.po index b3236e272..2817f0c05 100644 --- a/po/de.po +++ b/po/de.po @@ -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 \n" "Language-Team: German \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)" - diff --git a/po/es.po b/po/es.po index eb4919cf0..9af1f4ecc 100644 --- a/po/es.po +++ b/po/es.po @@ -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 \n" "Language-Team: weechat-dev \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 " diff --git a/po/fr.po b/po/fr.po index 680c4caf7..02dfa8d94 100644 --- a/po/fr.po +++ b/po/fr.po @@ -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 \n" "Language-Team: weechat-dev \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 " diff --git a/po/hu.po b/po/hu.po index 29185a356..2db77a583 100644 --- a/po/hu.po +++ b/po/hu.po @@ -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 \n" "Language-Team: weechat-dev \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 "" diff --git a/po/it.po b/po/it.po index 56db46ba1..496bd895a 100644 --- a/po/it.po +++ b/po/it.po @@ -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 \n" "Language-Team: weechat-dev \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 " diff --git a/po/ja.po b/po/ja.po index 1943f1e13..86de23f55 100644 --- a/po/ja.po +++ b/po/ja.po @@ -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 \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \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 " diff --git a/po/pt.po b/po/pt.po index 4ee9f1a82..21658a44c 100644 --- a/po/pt.po +++ b/po/pt.po @@ -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 \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 " diff --git a/po/pt_BR.po b/po/pt_BR.po index 0792c4683..e70cacfa6 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -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 \n" "Language-Team: weechat-dev \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 " diff --git a/po/ru.po b/po/ru.po index 2dbfcb736..e58caeb66 100644 --- a/po/ru.po +++ b/po/ru.po @@ -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 \n" "Language-Team: weechat-dev \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 "" diff --git a/po/tr.po b/po/tr.po index 47860fe52..8f5fc24a1 100644 --- a/po/tr.po +++ b/po/tr.po @@ -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 \n" "Language-Team: weechat-dev \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 "" diff --git a/po/weechat.pot b/po/weechat.pot index 2734b70e7..da3584e7c 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -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 \n" "Language-Team: weechat-dev \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 "" diff --git a/src/plugins/logger/logger-config.c b/src/plugins/logger/logger-config.c index 2c866d37a..51672b68b 100644 --- a/src/plugins/logger/logger-config.c +++ b/src/plugins/logger/logger-config.c @@ -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", diff --git a/src/plugins/logger/logger-config.h b/src/plugins/logger/logger-config.h index 203372031..50cbc647f 100644 --- a/src/plugins/logger/logger-config.h +++ b/src/plugins/logger/logger-config.h @@ -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; diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index ab55fcaac..87a83bb52 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -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; } }