core: add command line option "--stdout" in weechat-headless binary (closes #1475, closes #1477)

This commit is contained in:
Sébastien Helleu 2020-04-19 11:28:39 +02:00
parent 18a837c55b
commit 0b994d718d
34 changed files with 216 additions and 29 deletions

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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").

View File

@ -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]

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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]

View File

@ -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").
// TRANSLATION MISSING
*-d*, *--dir* _<path>_::
Imposta una directory come home per WeeChat (utilizzata per i file di

View File

@ -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]

View File

@ -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"。

View File

@ -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]

View File

@ -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ść

View File

@ -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]

View File

@ -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 (используется для
конфигурационных файлов, логов, пользовательских плагинов и скриптов).

View File

@ -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]

View File

@ -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"
@ -210,6 +210,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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"
@ -232,6 +232,15 @@ msgstr ""
" (standardmäßig blockiert WeeChat im "
"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 "

View File

@ -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"
@ -221,6 +221,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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"
@ -221,6 +221,19 @@ msgstr ""
" (par défaut en mode sans interface WeeChat est "
"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 "

View File

@ -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"
@ -212,6 +212,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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"
@ -213,6 +213,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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/"
@ -221,6 +221,15 @@ msgstr ""
" (ヘッドレスモードのデフォルトでは WeeChat はプロセ"
"スをブロックし、バックグラウンド動作しません)\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 "

View File

@ -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"
@ -221,6 +221,15 @@ msgstr ""
" (domyślnie w trybie bez interfejsu WeeChat nie "
"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 "

View File

@ -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"
@ -212,6 +212,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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"
@ -245,6 +245,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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"
@ -221,6 +221,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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"
@ -183,6 +183,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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"
@ -181,6 +181,15 @@ msgid ""
"and does not run in background)\n"
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 "

View File

@ -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;
}

View File

@ -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");
}

View File

@ -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;

View File

@ -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);