diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-19 11:28:39 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-19 11:28:39 +0200 |
commit | 0b994d718d32bee9d3ea2b215c12f04685ca2a8c (patch) | |
tree | 5b6629808348c7045756c4c8469771571fd17d97 | |
parent | 18a837c55bc25ebdd6ad25055bd8ae446dc57b5e (diff) | |
download | weechat-0b994d718d32bee9d3ea2b215c12f04685ca2a8c.zip |
core: add command line option "--stdout" in weechat-headless binary (closes #1475, closes #1477)
34 files changed, 216 insertions, 29 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 83c8be403..c8c0d7f6c 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,7 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: - * core: weechat-headless logs to stdout rather than ~/.weechat/weechat.log (issue #1475) + * core: add command line option "--stdout" in weechat-headless binary to log to stdout rather than ~/.weechat/weechat.log (issue #1475, issue #1477) * buflist: evaluate option buflist.look.sort so that sort can be customized for each of the three buflist bar items (issue #1465) * relay: add command "handshake" in weechat relay protocol and nonce to prevent replay attacks, add options relay.network.password_hash_algo, relay.network.password_hash_iterations, relay.network.nonce_size (issue #1474) * relay: add option relay.network.auth_timeout diff --git a/doc/cs/cmdline_options.cs.adoc b/doc/cs/cmdline_options.cs.adoc index 440404e96..cd0554d17 100644 --- a/doc/cs/cmdline_options.cs.adoc +++ b/doc/cs/cmdline_options.cs.adoc @@ -9,6 +9,12 @@ Run WeeChat in background, as a daemon (works only with the command *weechat-headless*). +// TRANSLATION MISSING +*--stdout*:: + Display log messages on standard output instead of writing them in log file + (works only with the command *weechat-headless*, not compatible with option + "--daemon"). + *-d*, *--dir* _<path>_:: Nastav cestu jako dovmský adresář pro WeeChat (použitou pro konfigurační soubory, logy, uživatelské pluginy a skripty), výchozí hodnota je diff --git a/doc/cs/weechat-headless.1.cs.adoc b/doc/cs/weechat-headless.1.cs.adoc index 4076c8b70..cc4619921 100644 --- a/doc/cs/weechat-headless.1.cs.adoc +++ b/doc/cs/weechat-headless.1.cs.adoc @@ -16,7 +16,7 @@ weechat-headless - the extensible chat client (headless version) // TRANSLATION MISSING [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/de/cmdline_options.de.adoc b/doc/de/cmdline_options.de.adoc index 225a26eeb..1e3eea743 100644 --- a/doc/de/cmdline_options.de.adoc +++ b/doc/de/cmdline_options.de.adoc @@ -8,6 +8,12 @@ startet WeeChat im Hintergrund, als Deamon (funktioniert nur mit dem Befehl *weechat-headless*). +// TRANSLATION MISSING +*--stdout*:: + Display log messages on standard output instead of writing them in log file + (works only with the command *weechat-headless*, not compatible with option + "--daemon"). + *-d*, *--dir* _<path>_:: legt den Konfigurationsordner für WeeChat fest in welchem die Erweiterungen, Skripten, Protokolldateien etc.pp. gesichert werden (Voreinstellung: "~/.weechat"). diff --git a/doc/de/weechat-headless.1.de.adoc b/doc/de/weechat-headless.1.de.adoc index 7fedb436b..eb20ee635 100644 --- a/doc/de/weechat-headless.1.de.adoc +++ b/doc/de/weechat-headless.1.de.adoc @@ -13,7 +13,7 @@ weechat-headless - der erweiterbare Chat Client (headless version) == SYNOPSIS [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/en/cmdline_options.en.adoc b/doc/en/cmdline_options.en.adoc index d43a2426c..190be3772 100644 --- a/doc/en/cmdline_options.en.adoc +++ b/doc/en/cmdline_options.en.adoc @@ -8,6 +8,11 @@ Run WeeChat in background, as a daemon (works only with the command *weechat-headless*). +*--stdout*:: + Display log messages on standard output instead of writing them in log file + (works only with the command *weechat-headless*, not compatible with option + "--daemon"). + *-d*, *--dir* _<path>_:: Set path as home for WeeChat (used for configuration files, logs, user plugins and scripts), default value is "~/.weechat" (note: directory is diff --git a/doc/en/weechat-headless.1.en.adoc b/doc/en/weechat-headless.1.en.adoc index 0dab42ecb..9b9c4ee47 100644 --- a/doc/en/weechat-headless.1.en.adoc +++ b/doc/en/weechat-headless.1.en.adoc @@ -13,7 +13,7 @@ weechat-headless - the extensible chat client (headless version) == SYNOPSIS [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/fr/cmdline_options.fr.adoc b/doc/fr/cmdline_options.fr.adoc index e8cd0021f..ee1bb8334 100644 --- a/doc/fr/cmdline_options.fr.adoc +++ b/doc/fr/cmdline_options.fr.adoc @@ -8,6 +8,11 @@ Lancer WeeChat en tâche de fond, comme un daemon (fonctionne seulement avec la commande *weechat-headless*). +*--stdout*:: + Afficher les messages de log sur la sortie standard plutôt que de les écrire + dans le fichier de log (fonctionne seulement avec la commande + *weechat-headless*, non compatible avec l'option "--daemon"). + *-d*, *--dir* _<répertoire>_:: Définir le répertoire comme étant la base de WeeChat (utilisé pour les fichiers de configuration, logs, extensions diff --git a/doc/fr/weechat-headless.1.fr.adoc b/doc/fr/weechat-headless.1.fr.adoc index 8b354e0eb..b0a428f1f 100644 --- a/doc/fr/weechat-headless.1.fr.adoc +++ b/doc/fr/weechat-headless.1.fr.adoc @@ -13,7 +13,7 @@ weechat-headless - le client de discussion extensible (version sans interface) == SYNOPSIS [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <extensions>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [option-debug...] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <extensions>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [option-debug...] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/it/cmdline_options.it.adoc b/doc/it/cmdline_options.it.adoc index ff3fc215c..f6ffdd8a3 100644 --- a/doc/it/cmdline_options.it.adoc +++ b/doc/it/cmdline_options.it.adoc @@ -10,6 +10,12 @@ *weechat-headless*). // TRANSLATION MISSING +*--stdout*:: + Display log messages on standard output instead of writing them in log file + (works only with the command *weechat-headless*, not compatible with option + "--daemon"). + +// TRANSLATION MISSING *-d*, *--dir* _<path>_:: Imposta una directory come home per WeeChat (utilizzata per i file di configurazione, log, plugin e script dell'utente), il valore predefinito diff --git a/doc/it/weechat-headless.1.it.adoc b/doc/it/weechat-headless.1.it.adoc index d8401aec1..bce6694fd 100644 --- a/doc/it/weechat-headless.1.it.adoc +++ b/doc/it/weechat-headless.1.it.adoc @@ -16,7 +16,7 @@ weechat-headless - the extensible chat client (headless version) // TRANSLATION MISSING [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/ja/cmdline_options.ja.adoc b/doc/ja/cmdline_options.ja.adoc index c85e76ec2..743821ee2 100644 --- a/doc/ja/cmdline_options.ja.adoc +++ b/doc/ja/cmdline_options.ja.adoc @@ -8,6 +8,12 @@ WeeChat をデーモン化してバックグラウンド実行 (*weechat-headless* コマンドで起動した場合のみ有効) +// TRANSLATION MISSING +*--stdout*:: + Display log messages on standard output instead of writing them in log file + (works only with the command *weechat-headless*, not compatible with option + "--daemon"). + *-d*, *--dir* _<path>_:: WeeChat のホームディレクトリを path に設定 (設定ファイル、ログ、 ユーザプラグイン、スクリプトに利用される)、初期値は "~/.weechat"。 diff --git a/doc/ja/weechat-headless.1.ja.adoc b/doc/ja/weechat-headless.1.ja.adoc index 0b7a44dfd..ae9cffe2d 100644 --- a/doc/ja/weechat-headless.1.ja.adoc +++ b/doc/ja/weechat-headless.1.ja.adoc @@ -13,7 +13,7 @@ weechat-headless - 拡張可能なチャットクライアント (ヘッドレ == 書式 [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/pl/cmdline_options.pl.adoc b/doc/pl/cmdline_options.pl.adoc index 5461846fb..d118ea4d1 100644 --- a/doc/pl/cmdline_options.pl.adoc +++ b/doc/pl/cmdline_options.pl.adoc @@ -7,6 +7,12 @@ *--daemon*:: Uruchamia WeeChat w tle jako demona (działa tylko z komendą *weechat-headless*). +// TRANSLATION MISSING +*--stdout*:: + Display log messages on standard output instead of writing them in log file + (works only with the command *weechat-headless*, not compatible with option + "--daemon"). + *-d*, *--dir* _<ścieżka>_:: Ustawia ścieżkę jako katalog domowy WeeChat (używany dla plików konfiguracyjnych, logów, wtyczek użytkownika i skryptów), domyślna wartość diff --git a/doc/pl/weechat-headless.1.pl.adoc b/doc/pl/weechat-headless.1.pl.adoc index 835b1622c..add5e3c28 100644 --- a/doc/pl/weechat-headless.1.pl.adoc +++ b/doc/pl/weechat-headless.1.pl.adoc @@ -13,7 +13,7 @@ weechat-headless - rozszerzalny klient rozmów (wersja headless) == SKŁADNIA [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <wtyczki>] [-r|--run-command <komenda>] [-s|--no-script] [--upgrade] [debug-option...] [wtyczka:opcja...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <wtyczki>] [-r|--run-command <komenda>] [-s|--no-script] [--upgrade] [debug-option...] [wtyczka:opcja...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/ru/cmdline_options.ru.adoc b/doc/ru/cmdline_options.ru.adoc index 87f3d918f..6607119c8 100644 --- a/doc/ru/cmdline_options.ru.adoc +++ b/doc/ru/cmdline_options.ru.adoc @@ -9,6 +9,12 @@ Run WeeChat in background, as a daemon (works only with the command *weechat-headless*). +// TRANSLATION MISSING +*--stdout*:: + Display log messages on standard output instead of writing them in log file + (works only with the command *weechat-headless*, not compatible with option + "--daemon"). + *-d*, *--dir* _<путь>_:: Установить <путь> как домашнюю директорию для WeeChat (используется для конфигурационных файлов, логов, пользовательских плагинов и скриптов). diff --git a/doc/ru/weechat-headless.1.ru.adoc b/doc/ru/weechat-headless.1.ru.adoc index 81cca351d..fc5a1d532 100644 --- a/doc/ru/weechat-headless.1.ru.adoc +++ b/doc/ru/weechat-headless.1.ru.adoc @@ -16,7 +16,7 @@ weechat-headless - расширяемый чат-клиент (headless version) // TRANSLATION MISSING [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [--stdout] [-d|--dir <path>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [debug-option...] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -211,6 +211,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -233,6 +233,15 @@ msgstr "" "Hintergrundmodus den Prozess und gibt das Terminal nicht frei)\n" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -222,6 +222,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" -"PO-Revision-Date: 2020-04-18 11:34+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" +"PO-Revision-Date: 2020-04-19 11:22+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -222,6 +222,19 @@ msgstr "" "bloquant et ne tourne pas en tâche de fond)\n" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" +" --stdout afficher les messages de log sur la sortie " +"standard plutôt que de les écrire dans le fichier de log\n" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" +" (option ignorée si l'option \"--daemon\" est " +"donnée)\n" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -213,6 +213,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -214,6 +214,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -222,6 +222,15 @@ msgstr "" "スをブロックし、バックグラウンド動作しません)\n" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -222,6 +222,15 @@ msgstr "" "uruchamia się w tle)\n" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -213,6 +213,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index fe10004f7..787e1d7ed 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: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -246,6 +246,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -222,6 +222,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+0200\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -184,6 +184,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" diff --git a/po/weechat.pot b/po/weechat.pot index d500edebc..105cc58a4 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: 2020-04-18 11:30+0200\n" +"POT-Creation-Date: 2020-04-19 11:21+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" @@ -182,6 +182,15 @@ msgid "" msgstr "" msgid "" +" --stdout display log messages on standard output instead " +"of writing them in log file\n" +msgstr "" + +msgid "" +" (option ignored if option \"--daemon\" is given)\n" +msgstr "" + +msgid "" "Debug options (for tools like valgrind, DO NOT USE IN PRODUCTION):\n" " --no-dlclose do not call function dlclose after plugins are " "unloaded\n" diff --git a/src/core/wee-log.c b/src/core/wee-log.c index a08f1d276..a708b4bd2 100644 --- a/src/core/wee-log.c +++ b/src/core/wee-log.c @@ -68,7 +68,7 @@ log_open (const char *filename, const char *mode) if (weechat_log_file) return 0; - if (weechat_headless && !weechat_daemon) + if (weechat_log_stdout) { weechat_log_file = stdout; } @@ -88,8 +88,11 @@ log_open (const char *filename, const char *mode) if (!weechat_log_file) { - free (weechat_log_filename); - weechat_log_filename = NULL; + if (weechat_log_filename) + { + free (weechat_log_filename); + weechat_log_filename = NULL; + } return 0; } diff --git a/src/core/weechat.c b/src/core/weechat.c index fd90dbf06..f5f83a6c5 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -89,6 +89,7 @@ int weechat_headless = 0; /* 1 if running headless (no GUI) */ int weechat_daemon = 0; /* 1 if daemonized (no foreground) */ +int weechat_log_stdout = 0; /* 1 to log messages on stdout */ int weechat_debug_core = 0; /* debug level for core */ char *weechat_argv0 = NULL; /* WeeChat binary file name (argv[0])*/ int weechat_upgrading = 0; /* =1 if WeeChat is upgrading */ @@ -194,6 +195,14 @@ weechat_display_usage () stdout, _(" (by default in headless mode " "WeeChat is blocking and does not run in background)\n")); + string_fprintf ( + stdout, + _(" --stdout display log messages on standard " + "output instead of writing them in log file\n")); + string_fprintf ( + stdout, + _(" (option ignored if option " + "\"--daemon\" is given)\n")); string_fprintf (stdout, "\n"); } diff --git a/src/core/weechat.h b/src/core/weechat.h index 39917851f..c910746a1 100644 --- a/src/core/weechat.h +++ b/src/core/weechat.h @@ -101,6 +101,7 @@ struct t_weelist; /* global variables and functions */ extern int weechat_headless; extern int weechat_daemon; +extern int weechat_log_stdout; extern int weechat_debug_core; extern char *weechat_argv0; extern int weechat_upgrading; diff --git a/src/gui/curses/headless/main.c b/src/gui/curses/headless/main.c index 99df53d99..b6dd49e54 100644 --- a/src/gui/curses/headless/main.c +++ b/src/gui/curses/headless/main.c @@ -101,8 +101,9 @@ main (int argc, char *argv[]) weechat_headless = 1; /* - * If "--daemon" is received in command line arguments, - * daemonize the process. + * Parse extra options for headless mode: + * - "--daemon": daemonize the process + * - "--stdout": log messages to stdout (instead of log file) */ weechat_daemon = 0; for (i = 1; i < argc; i++) @@ -110,11 +111,17 @@ main (int argc, char *argv[]) if (strcmp (argv[i], "--daemon") == 0) { weechat_daemon = 1; - break; + } + else if (strcmp (argv[i], "--stdout") == 0) + { + weechat_log_stdout = 1; } } if (weechat_daemon) + { + weechat_log_stdout = 0; daemonize (); + } /* init, main loop and end */ weechat_init (argc, argv, &gui_main_init); |