summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--doc/de/includes/autogen_user_options.de.adoc18
-rw-r--r--doc/de/weechat_user.de.adoc49
-rw-r--r--doc/en/includes/autogen_user_options.en.adoc18
-rw-r--r--doc/en/weechat_user.en.adoc44
-rw-r--r--doc/fr/includes/autogen_user_options.fr.adoc18
-rw-r--r--doc/fr/weechat_user.fr.adoc44
-rw-r--r--doc/it/includes/autogen_user_options.it.adoc18
-rw-r--r--doc/it/weechat_user.it.adoc46
-rw-r--r--doc/ja/includes/autogen_user_options.ja.adoc18
-rw-r--r--doc/ja/weechat_user.ja.adoc47
-rw-r--r--doc/pl/includes/autogen_user_options.pl.adoc18
-rw-r--r--doc/pl/weechat_user.pl.adoc47
-rw-r--r--doc/sr/includes/autogen_user_options.sr.adoc18
-rw-r--r--doc/sr/weechat_user.sr.adoc49
-rw-r--r--po/cs.po54
-rw-r--r--po/de.po181
-rw-r--r--po/es.po52
-rw-r--r--po/fr.po76
-rw-r--r--po/hu.po50
-rw-r--r--po/it.po52
-rw-r--r--po/ja.po52
-rw-r--r--po/pl.po52
-rw-r--r--po/pt.po52
-rw-r--r--po/pt_BR.po54
-rw-r--r--po/ru.po50
-rw-r--r--po/sr.po64
-rw-r--r--po/tr.po64
-rw-r--r--po/weechat.pot48
-rw-r--r--src/plugins/logger/logger-backlog.c2
-rw-r--r--src/plugins/logger/logger-buffer.c690
-rw-r--r--src/plugins/logger/logger-buffer.h25
-rw-r--r--src/plugins/logger/logger-command.c2
-rw-r--r--src/plugins/logger/logger-config.c115
-rw-r--r--src/plugins/logger/logger-config.h6
-rw-r--r--src/plugins/logger/logger.c440
-rw-r--r--src/plugins/logger/logger.h8
37 files changed, 1848 insertions, 794 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index f6a133c34..9d36352c7 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -33,6 +33,7 @@ New features::
* buflist: add variable `${hotlist_priority_number}` (integer version of `${hotlist_priority}`)
* irc: display SETNAME command in channels and private buffers, add options irc.color.message_setname and irc.look.smart_filter_setname (issue #1805)
* irc: add option irc.look.display_pv_nick_change
+ * logger: add options to rotate and compress log files: logger.file.rotation_compression_level, logger.file.rotation_compression_type and logger.file.rotation_size_max (issue #314)
* spell: allow special dict value "-" to disable spell checking on a specific buffer (issue #1699)
* trigger: add elapsed time for trigger execution on monitor buffer when trigger debug is set, add option trigger.color.identifier (issue #1806)
diff --git a/doc/de/includes/autogen_user_options.de.adoc b/doc/de/includes/autogen_user_options.de.adoc
index eb8bd4571..1ce2a5f9c 100644
--- a/doc/de/includes/autogen_user_options.de.adoc
+++ b/doc/de/includes/autogen_user_options.de.adoc
@@ -1468,6 +1468,24 @@
** Werte: beliebige Zeichenkette
** Standardwert: `+"_"+`
+* [[option_logger.file.rotation_compression_level]] *logger.file.rotation_compression_level*
+** Beschreibung: pass:none[compression level for rotated log files (with extension ".1", ".2", etc.), if option logger.file.rotation_compression_type is enabled: 1 = low compression / fast ... 100 = best compression / slow; the value is a percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is recommended, it offers a good compromise between compression and speed]
+** Typ: integer
+** Werte: 1 .. 100
+** Standardwert: `+20+`
+
+* [[option_logger.file.rotation_compression_type]] *logger.file.rotation_compression_type*
+** Beschreibung: pass:none[compression type for rotated log files; if set to "none", rotated log files are not compressed; WARNING: if rotation was enabled with another type of compression (or no compression), you must first unload the logger plugin, compress files with the new type (or decompress files), then change the option in logger.conf, then load the logger plugin]
+** Typ: integer
+** Werte: none, gzip, zstd
+** Standardwert: `+none+`
+
+* [[option_logger.file.rotation_size_max]] *logger.file.rotation_size_max*
+** Beschreibung: pass:none[when this size is reached, a rotation of log files is performed: the existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) and the current file is renamed with extension .1; an integer number with a suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = megabytes, g = gigabytes, t = terabytes; example: "2g" causes a rotation if the file size is > 2,000,000,000 bytes; if set to "0", no rotation is performed (unlimited log size); WARNING: before changing this option, you should first set the compression type via option logger.file.rotation_compression_type]
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette
+** Standardwert: `+"0"+`
+
* [[option_logger.file.time_format]] *logger.file.time_format*
** Beschreibung: pass:none[Zeitstempel in Protokoll-Datei nutzen (siehe man strftime, welche Platzhalter für das Datum und die Uhrzeit verwendet werden)]
** Typ: Zeichenkette
diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc
index af598343e..88fd0e7e6 100644
--- a/doc/de/weechat_user.de.adoc
+++ b/doc/de/weechat_user.de.adoc
@@ -114,16 +114,42 @@ WeeChat *erforderlich* sind:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Paket ^(1)^ | Version | Funktion
-| C compiler (gcc / clang) | | zum Erstellen der Binärdatei.
-| cmake | ≥ 3.0 | zum kompilieren (autotools ist möglich. CMake wird aber empfohlen).
-| pkg-config | | entdeckt installierte Bibliotheken.
-| libncursesw5-dev ^(2)^ | | Ncurses Oberfläche.
-| libcurl4-gnutls-dev | | URL Transfer.
-| libgcrypt20-dev | | Geschützte Daten, IRC SASL Authentifikation.
-| libgnutls28-dev | ≥ 2.2.0 ^(3)^ | SSL Verbindung zu einem IRC Server, Unterstützung von SSL in der Relay-Erweiterung, IRC SASL Authentifikation (ECDSA-NIST256P-CHALLENGE).
-| zlib1g-dev | | Kompression von Nachrichten (WeeChat -> client) mit https://zlib.net/[zlib ^↗^,window=_blank] in relay Erweitertungen (weechat Protokoll), Skript-Erweiterung übertragen werden.
-| libzstd-dev | | Kompression von Nachrichten (WeeChat -> client) mit https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] in relay Erweiterung (weechat Protokoll).
+// TRANSLATION MISSING
+| Paket ^(1)^ | Version | Features
+
+| C compiler (gcc / clang) |
+| zum Erstellen der Binärdatei.
+
+| cmake | ≥ 3.0
+| zum kompilieren (autotools ist möglich. CMake wird aber empfohlen).
+
+| pkg-config |
+| entdeckt installierte Bibliotheken.
+
+| libncursesw5-dev ^(2)^ |
+| Ncurses Oberfläche.
+
+| libcurl4-gnutls-dev |
+| URL Transfer.
+
+| libgcrypt20-dev |
+| Geschützte Daten, IRC SASL Authentifikation.
+
+// TRANSLATION MISSING
+| libgnutls28-dev | ≥ 2.2.0 ^(3)^
+| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
+ Relay plugin: support of TLS connections.
+
+// TRANSLATION MISSING
+| zlib1g-dev |
+| Logger plugin: compression of rotated log files (gzip). +
+ Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] (weechat protocol). +
+ Script plugin: read of repository index file (gzip).
+
+// TRANSLATION MISSING
+| libzstd-dev |
+| Logger plugin: compression of rotated log files. +
+ Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] (weechat protocol).
|===
[NOTE]
@@ -141,7 +167,8 @@ WeeChat optional sind:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Paket ^(1)^ | Version | Funktion
+// TRANSLATION MISSING
+| Paket ^(1)^ | Version | Features
| {cpp} compiler (pass:[g++ / clang++]) | | zum Erstellen der Binärdatei und um Test auszuführen, JavaScript Erweiterung.
| gettext | | Internationalisierung (Übersetzung der Mitteilungen; Hauptsprache ist englisch).
| ca-certificates | | Zertifikate für SSL Verbindungen.
diff --git a/doc/en/includes/autogen_user_options.en.adoc b/doc/en/includes/autogen_user_options.en.adoc
index fa8c4f1e1..ef167826c 100644
--- a/doc/en/includes/autogen_user_options.en.adoc
+++ b/doc/en/includes/autogen_user_options.en.adoc
@@ -1468,6 +1468,24 @@
** values: any string
** default value: `+"_"+`
+* [[option_logger.file.rotation_compression_level]] *logger.file.rotation_compression_level*
+** description: pass:none[compression level for rotated log files (with extension ".1", ".2", etc.), if option logger.file.rotation_compression_type is enabled: 1 = low compression / fast ... 100 = best compression / slow; the value is a percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is recommended, it offers a good compromise between compression and speed]
+** type: integer
+** values: 1 .. 100
+** default value: `+20+`
+
+* [[option_logger.file.rotation_compression_type]] *logger.file.rotation_compression_type*
+** description: pass:none[compression type for rotated log files; if set to "none", rotated log files are not compressed; WARNING: if rotation was enabled with another type of compression (or no compression), you must first unload the logger plugin, compress files with the new type (or decompress files), then change the option in logger.conf, then load the logger plugin]
+** type: integer
+** values: none, gzip, zstd
+** default value: `+none+`
+
+* [[option_logger.file.rotation_size_max]] *logger.file.rotation_size_max*
+** description: pass:none[when this size is reached, a rotation of log files is performed: the existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) and the current file is renamed with extension .1; an integer number with a suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = megabytes, g = gigabytes, t = terabytes; example: "2g" causes a rotation if the file size is > 2,000,000,000 bytes; if set to "0", no rotation is performed (unlimited log size); WARNING: before changing this option, you should first set the compression type via option logger.file.rotation_compression_type]
+** type: string
+** values: any string
+** default value: `+"0"+`
+
* [[option_logger.file.time_format]] *logger.file.time_format*
** description: pass:none[timestamp used in log files (see man strftime for date/time specifiers)]
** type: string
diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc
index 98e6eb038..a5bab362a 100644
--- a/doc/en/weechat_user.en.adoc
+++ b/doc/en/weechat_user.en.adoc
@@ -108,16 +108,38 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Package ^(1)^ | Version | Feature
-| C compiler (gcc / clang) | | Build.
-| cmake | ≥ 3.0 | Build (autotools still possible, but CMake is recommended).
-| pkg-config | | Detect installed libraries.
-| libncursesw5-dev ^(2)^ | | Ncurses interface.
-| libcurl4-gnutls-dev | | URL transfer.
-| libgcrypt20-dev | | Secured data, IRC SASL authentication.
-| libgnutls28-dev | ≥ 2.2.0 ^(3)^ | SSL connection to IRC server, support of SSL in relay plugin, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE).
-| zlib1g-dev | | Compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] in relay plugin (weechat protocol), script plugin.
-| libzstd-dev | | Compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] in relay plugin (weechat protocol).
+| Package ^(1)^ | Version | Features
+
+| C compiler (gcc / clang) |
+| Build.
+
+| cmake | ≥ 3.0
+| Build (autotools still possible, but CMake is recommended).
+
+| pkg-config |
+| Detect installed libraries.
+
+| libncursesw5-dev ^(2)^ |
+| Ncurses interface.
+
+| libcurl4-gnutls-dev |
+| URL transfer.
+
+| libgcrypt20-dev |
+| Secured data, IRC SASL authentication.
+
+| libgnutls28-dev | ≥ 2.2.0 ^(3)^
+| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
+ Relay plugin: support of TLS connections.
+
+| zlib1g-dev |
+| Logger plugin: compression of rotated log files (gzip). +
+ Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] (weechat protocol). +
+ Script plugin: read of repository index file (gzip).
+
+| libzstd-dev |
+| Logger plugin: compression of rotated log files. +
+ Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] (weechat protocol).
|===
[NOTE]
@@ -134,7 +156,7 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Package ^(1)^ | Version | Feature
+| Package ^(1)^ | Version | Features
| {cpp} compiler (pass:[g++ / clang++]) | | Build and run tests, JavaScript plugin.
| gettext | | Internationalization (translation of messages; base language is English).
| ca-certificates | | Certificates for SSL connections.
diff --git a/doc/fr/includes/autogen_user_options.fr.adoc b/doc/fr/includes/autogen_user_options.fr.adoc
index 760b805a3..b22312a88 100644
--- a/doc/fr/includes/autogen_user_options.fr.adoc
+++ b/doc/fr/includes/autogen_user_options.fr.adoc
@@ -1468,6 +1468,24 @@
** valeurs: toute chaîne
** valeur par défaut: `+"_"+`
+* [[option_logger.file.rotation_compression_level]] *logger.file.rotation_compression_level*
+** description: pass:none[niveau de compression pour les fichiers de log qui tournent (avec extension ".1", ".2", etc.), si l'option logger.file.rotation_compression_type est activée ; 1 = peu de compression / rapide ... 100 = meilleure compression / lent ; la valeur est un pourcentage converti de 1 à 9 pour gzip et de 1 à 19 pour zstd ; la valeur par défaut est recommandée, elle offre un bon compromis compression/vitesse]
+** type: entier
+** valeurs: 1 .. 100
+** valeur par défaut: `+20+`
+
+* [[option_logger.file.rotation_compression_type]] *logger.file.rotation_compression_type*
+** description: pass:none[type de compression pour les fichiers de log qui tournent ; si défini à "none", les fichiers de logs qui tournent ne sont pas compressés ; ATTENTION : si la rotation est activée avec un autre type de compression (ou pas de compression), vous devez d'abord décharger l'extension logger, compresser les fichiers avec le nouveau type (ou décompresser les fichiers), puis changer l'option dans logger.conf, puis charger l'extension logger]
+** type: entier
+** valeurs: none, gzip, zstd
+** valeur par défaut: `+none+`
+
+* [[option_logger.file.rotation_size_max]] *logger.file.rotation_size_max*
+** description: pass:none[lorsque cette taille est atteinte, une rotation des fichiers est effectuée : les fichiers de log existants sont renommés (.1 devient .2, .2 devient .3, etc.) et le fichier courant est renommé avec l'extension .1 ; un nombre entier avec un suffixe est accepté : b = octets (par défaut si pas d'unité spécifiée), k = kilo-octets, m = méga-octets, g = giga-octets, t = téra-octets ; exemple : "2g" provoque une rotation si la taille du fichier est > 2 000 000 000 octets ; si défini à "0", aucune rotation n'est effectuée (taille de log illimitée) ; ATTENTION : avant de changer cette option, vous devriez d'abord définir le type de compression via l'option logger.file.rotation_compression_type]
+** type: chaîne
+** valeurs: toute chaîne
+** valeur par défaut: `+"0"+`
+
* [[option_logger.file.time_format]] *logger.file.time_format*
** description: pass:none[format de date/heure utilisé dans les fichiers log (voir man strftime pour le format de date/heure)]
** type: chaîne
diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc
index 12639c66e..03addfbea 100644
--- a/doc/fr/weechat_user.fr.adoc
+++ b/doc/fr/weechat_user.fr.adoc
@@ -109,16 +109,38 @@ Le tableau suivant liste les paquets *requis* pour compiler WeeChat :
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Paquet ^(1)^ | Version | Fonctionnalité
-| compilateur C (gcc / clang) | | Construction.
-| cmake | ≥ 3.0 | Construction (autotools toujours possible, mais CMake est recommandé).
-| pkg-config | | Détection des bibliothèques installées.
-| libncursesw5-dev ^(2)^ | | Interface ncurses.
-| libcurl4-gnutls-dev | | Transfert d'URL.
-| libgcrypt20-dev | | Données sécurisées, authentification IRC SASL.
-| libgnutls28-dev | ≥ 2.2.0 ^(3)^ | Connexion SSL au serveur IRC, support SSL dans l'extension relay, authentification IRC SASL (ECDSA-NIST256P-CHALLENGE).
-| zlib1g-dev | | Compression des messages (WeeChat -> client) avec https://zlib.net/[zlib ^↗^,window=_blank] dans l'extension relay (protocole weechat), extension script.
-| libzstd-dev | | Compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] dans l'extension relay (protocole weechat).
+| Paquet ^(1)^ | Version | Fonctionnalités
+
+| compilateur C (gcc / clang) |
+| Construction.
+
+| cmake | ≥ 3.0
+| Construction (autotools toujours possible, mais CMake est recommandé).
+
+| pkg-config |
+| Détection des bibliothèques installées.
+
+| libncursesw5-dev ^(2)^ |
+| Interface ncurses.
+
+| libcurl4-gnutls-dev |
+| Transfert d'URL.
+
+| libgcrypt20-dev |
+| Données sécurisées, authentification IRC SASL.
+
+| libgnutls28-dev | ≥ 2.2.0 ^(3)^
+| Extension IRC : support des connexions TLS, authentification IRC SASL (ECDSA-NIST256P-CHALLENGE). +
+ Extension Relay : support des connexions TLS.
+
+| zlib1g-dev |
+| Extension Logger : compression des fichiers de log qui tournent (gzip). +
+ Extention Relay : compression des messages (WeeChat -> client) avec https://zlib.net/[zlib ^↗^,window=_blank] (protocole weechat). +
+ Extension Script : lecture du fichier d'index du dépôt (gzip).
+
+| libzstd-dev |
+| Extension Logger : compression des fichiers de log qui tournent. +
+ Extension Relay : compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] (protocole weechat).
|===
[NOTE]
@@ -135,7 +157,7 @@ Le tableau suivant liste les paquets optionnels pour compiler WeeChat :
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Paquet ^(1)^ | Version | Fonctionnalité
+| Paquet ^(1)^ | Version | Fonctionnalités
| compilateur {cpp} (pass:[g++ / clang++]) | | Construction et lancement des tests, extension JavaScript.
| gettext | | Internationalisation (traduction des messages ; la langue de base est l'anglais).
| ca-certificates | | Certificats pour les connexions SSL.
diff --git a/doc/it/includes/autogen_user_options.it.adoc b/doc/it/includes/autogen_user_options.it.adoc
index 2c21a3093..04ccedf76 100644
--- a/doc/it/includes/autogen_user_options.it.adoc
+++ b/doc/it/includes/autogen_user_options.it.adoc
@@ -1468,6 +1468,24 @@
** valori: qualsiasi stringa
** valore predefinito: `+"_"+`
+* [[option_logger.file.rotation_compression_level]] *logger.file.rotation_compression_level*
+** descrizione: pass:none[compression level for rotated log files (with extension ".1", ".2", etc.), if option logger.file.rotation_compression_type is enabled: 1 = low compression / fast ... 100 = best compression / slow; the value is a percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is recommended, it offers a good compromise between compression and speed]
+** tipo: intero
+** valori: 1 .. 100
+** valore predefinito: `+20+`
+
+* [[option_logger.file.rotation_compression_type]] *logger.file.rotation_compression_type*
+** descrizione: pass:none[compression type for rotated log files; if set to "none", rotated log files are not compressed; WARNING: if rotation was enabled with another type of compression (or no compression), you must first unload the logger plugin, compress files with the new type (or decompress files), then change the option in logger.conf, then load the logger plugin]
+** tipo: intero
+** valori: none, gzip, zstd
+** valore predefinito: `+none+`
+
+* [[option_logger.file.rotation_size_max]] *logger.file.rotation_size_max*
+** descrizione: pass:none[when this size is reached, a rotation of log files is performed: the existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) and the current file is renamed with extension .1; an integer number with a suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = megabytes, g = gigabytes, t = terabytes; example: "2g" causes a rotation if the file size is > 2,000,000,000 bytes; if set to "0", no rotation is performed (unlimited log size); WARNING: before changing this option, you should first set the compression type via option logger.file.rotation_compression_type]
+** tipo: stringa
+** valori: qualsiasi stringa
+** valore predefinito: `+"0"+`
+
* [[option_logger.file.time_format]] *logger.file.time_format*
** descrizione: pass:none[data e ora usati nei file di log (consultare man strftime per gli specificatori di data/ora)]
** tipo: stringa
diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc
index c350e08b0..12942dc98 100644
--- a/doc/it/weechat_user.it.adoc
+++ b/doc/it/weechat_user.it.adoc
@@ -131,22 +131,45 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Pacchetto ^(1)^ | Versione | Caratteristica
// TRANSLATION MISSING
-| C compiler (gcc / clang) | | Build.
-| cmake | ≥ 3.0 | Compilazione (ancora possibile con autotools, ma si raccomanda CMake).
+| Pacchetto ^(1)^ | Versione | Features
+
// TRANSLATION MISSING
-| pkg-config | | Detect installed libraries.
-| libncursesw5-dev ^(2)^ | | Interfaccia ncurses.
-| libcurl4-gnutls-dev | | Trasferimento URL.
+| C compiler (gcc / clang) |
+| Build.
+
+| cmake | ≥ 3.0
+| Compilazione (ancora possibile con autotools, ma si raccomanda CMake).
+
// TRANSLATION MISSING
-| libgcrypt20-dev | | Secured data, IRC SASL authentication.
+| pkg-config |
+| Detect installed libraries.
+
+| libncursesw5-dev ^(2)^ |
+| Interfaccia ncurses.
+
+| libcurl4-gnutls-dev |
+| Trasferimento URL.
+
// TRANSLATION MISSING
-| libgnutls28-dev | ≥ 2.2.0 ^(3)^ | Connessione SSL al server IRC, support of SSL in relay plugin, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE).
+| libgcrypt20-dev |
+| Secured data, IRC SASL authentication.
+
// TRANSLATION MISSING
-| zlib1g-dev | | Compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] in relay plugin (weechat protocol), script plugin.
+| libgnutls28-dev | ≥ 2.2.0 ^(3)^
+| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
+ Relay plugin: support of TLS connections.
+
// TRANSLATION MISSING
-| libzstd-dev | | Compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] in relay plugin (weechat protocol).
+| zlib1g-dev |
+| Logger plugin: compression of rotated log files (gzip). +
+ Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] (weechat protocol). +
+ Script plugin: read of repository index file (gzip).
+
+// TRANSLATION MISSING
+| libzstd-dev |
+| Logger plugin: compression of rotated log files. +
+ Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] (weechat protocol).
|===
[NOTE]
@@ -167,7 +190,8 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Pacchetto ^(1)^ | Versione | Caratteristica
+// TRANSLATION MISSING
+| Pacchetto ^(1)^ | Versione | Features
// TRANSLATION MISSING
| {cpp} compiler (pass:[g++ / clang++]) | | Build and run tests, plugin JavaScript.
| gettext | | Internazionalizzazione (traduzione dei messaggi; la lingua base è l'inglese).
diff --git a/doc/ja/includes/autogen_user_options.ja.adoc b/doc/ja/includes/autogen_user_options.ja.adoc
index d7dbb95c9..a9357fcc7 100644
--- a/doc/ja/includes/autogen_user_options.ja.adoc
+++ b/doc/ja/includes/autogen_user_options.ja.adoc
@@ -1468,6 +1468,24 @@
** 値: 未制約文字列
** デフォルト値: `+"_"+`
+* [[option_logger.file.rotation_compression_level]] *logger.file.rotation_compression_level*
+** 説明: pass:none[compression level for rotated log files (with extension ".1", ".2", etc.), if option logger.file.rotation_compression_type is enabled: 1 = low compression / fast ... 100 = best compression / slow; the value is a percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is recommended, it offers a good compromise between compression and speed]
+** タイプ: 整数
+** 値: 1 .. 100
+** デフォルト値: `+20+`
+
+* [[option_logger.file.rotation_compression_type]] *logger.file.rotation_compression_type*
+** 説明: pass:none[compression type for rotated log files; if set to "none", rotated log files are not compressed; WARNING: if rotation was enabled with another type of compression (or no compression), you must first unload the logger plugin, compress files with the new type (or decompress files), then change the option in logger.conf, then load the logger plugin]
+** タイプ: 整数
+** 値: none, gzip, zstd
+** デフォルト値: `+none+`
+
+* [[option_logger.file.rotation_size_max]] *logger.file.rotation_size_max*
+** 説明: pass:none[when this size is reached, a rotation of log files is performed: the existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) and the current file is renamed with extension .1; an integer number with a suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = megabytes, g = gigabytes, t = terabytes; example: "2g" causes a rotation if the file size is > 2,000,000,000 bytes; if set to "0", no rotation is performed (unlimited log size); WARNING: before changing this option, you should first set the compression type via option logger.file.rotation_compression_type]
+** タイプ: 文字列
+** 値: 未制約文字列
+** デフォルト値: `+"0"+`
+
* [[option_logger.file.time_format]] *logger.file.time_format*
** 説明: pass:none[ログファイルで使用するタイムスタンプ (日付/時間指定子は strftime の man 参照)]
** タイプ: 文字列
diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc
index 85560c437..b4f0b02bf 100644
--- a/doc/ja/weechat_user.ja.adoc
+++ b/doc/ja/weechat_user.ja.adoc
@@ -120,18 +120,42 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| パッケージ ^(1)^ | バージョン | 機能
-| C コンパイラ (gcc / clang) | | ビルド
-| cmake | ≥ 3.0 | ビルド (autotools でも可能ですが、CMake を推奨します)
-| pkg-config | | インストール済みライブラリを検出
-| libncursesw5-dev ^(2)^ | | ncurses インターフェース
-| libcurl4-gnutls-dev | | URL 転送
-| libgcrypt20-dev | | 保護データ、IRC SASL 認証
-| libgnutls28-dev | 2.2.0 以上 ^(3)^ | IRC サーバへの SSL 接続、IRC SASL 認証 (ECDSA-NIST256P-CHALLENGE)
// TRANSLATION MISSING
-| zlib1g-dev | | Compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] in relay plugin (weechat protocol), script plugin.
+| パッケージ ^(1)^ | バージョン | Features
+
+| C コンパイラ (gcc / clang) |
+| ビルド
+
+| cmake | ≥ 3.0
+| ビルド (autotools でも可能ですが、CMake を推奨します)
+
+| pkg-config |
+| インストール済みライブラリを検出
+
+| libncursesw5-dev ^(2)^ |
+| ncurses インターフェース
+
+| libcurl4-gnutls-dev |
+| URL 転送
+
+| libgcrypt20-dev |
+| 保護データ、IRC SASL 認証
+
+// TRANSLATION MISSING
+| libgnutls28-dev | ≥ 2.2.0 ^(3)^
+| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
+ Relay plugin: support of TLS connections.
+
// TRANSLATION MISSING
-| libzstd-dev | | Compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] in relay plugin (weechat protocol).
+| zlib1g-dev |
+| Logger plugin: compression of rotated log files (gzip). +
+ Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] (weechat protocol). +
+ Script plugin: read of repository index file (gzip).
+
+// TRANSLATION MISSING
+| libzstd-dev |
+| Logger plugin: compression of rotated log files. +
+ Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] (weechat protocol).
|===
[NOTE]
@@ -150,7 +174,8 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| パッケージ ^(1)^ | バージョン | 機能
+// TRANSLATION MISSING
+| パッケージ ^(1)^ | バージョン | Features
| {cpp} コンパイラ (pass:[g++ / clang++]) | | ビルドとテストの実行、JavaScript プラグイン
| gettext | | 国際化 (メッセージの翻訳; ベース言語は英語です)
| ca-certificates | | SSL 接続に必要な証明書、relay プラグインで SSL サポート
diff --git a/doc/pl/includes/autogen_user_options.pl.adoc b/doc/pl/includes/autogen_user_options.pl.adoc
index e96c80e3a..1675e725c 100644
--- a/doc/pl/includes/autogen_user_options.pl.adoc
+++ b/doc/pl/includes/autogen_user_options.pl.adoc
@@ -1468,6 +1468,24 @@
** wartości: dowolny ciąg
** domyślna wartość: `+"_"+`
+* [[option_logger.file.rotation_compression_level]] *logger.file.rotation_compression_level*
+** opis: pass:none[compression level for rotated log files (with extension ".1", ".2", etc.), if option logger.file.rotation_compression_type is enabled: 1 = low compression / fast ... 100 = best compression / slow; the value is a percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is recommended, it offers a good compromise between compression and speed]
+** typ: liczba
+** wartości: 1 .. 100
+** domyślna wartość: `+20+`
+
+* [[option_logger.file.rotation_compression_type]] *logger.file.rotation_compression_type*
+** opis: pass:none[compression type for rotated log files; if set to "none", rotated log files are not compressed; WARNING: if rotation was enabled with another type of compression (or no compression), you must first unload the logger plugin, compress files with the new type (or decompress files), then change the option in logger.conf, then load the logger plugin]
+** typ: liczba
+** wartości: none, gzip, zstd
+** domyślna wartość: `+none+`
+
+* [[option_logger.file.rotation_size_max]] *logger.file.rotation_size_max*
+** opis: pass:none[when this size is reached, a rotation of log files is performed: the existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) and the current file is renamed with extension .1; an integer number with a suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = megabytes, g = gigabytes, t = terabytes; example: "2g" causes a rotation if the file size is > 2,000,000,000 bytes; if set to "0", no rotation is performed (unlimited log size); WARNING: before changing this option, you should first set the compression type via option logger.file.rotation_compression_type]
+** typ: ciąg
+** wartości: dowolny ciąg
+** domyślna wartość: `+"0"+`
+
* [[option_logger.file.time_format]] *logger.file.time_format*
** opis: pass:none[format czasu użyty w plikach z logami (zobacz man strftime dla specyfikatorów daty/czasu)]
** typ: ciąg
diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc
index 21c52582b..38852e253 100644
--- a/doc/pl/weechat_user.pl.adoc
+++ b/doc/pl/weechat_user.pl.adoc
@@ -120,18 +120,42 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Pakiet ^(1)^ | Wersja | Opis
-| kompilator C (gcc / clang) | | Kompilacja.
-| cmake | ≥ 3.0 | Kompilacja (możliwe jest użycie autotools, jednak CMake jest zalecany).
-| pkg-config | | Wykrywa zainstalowane biblioteki.
-| libncursesw5-dev ^(2)^ | | Interfejs ncurses.
-| libcurl4-gnutls-dev | | Transfer URL.
-| libgcrypt20-dev | | Zabezpieczone dane, uwierzytelnianie IRC SASL.
-| libgnutls28-dev | ≥ 2.2.0 ^(3)^ | Połączenia SSL z serwerami IRC, wsparcie dla SSL we wtyczce relay, uwierzytelnianie IRC SASL (ECDSA-NIST256P-CHALLENGE).
// TRANSLATION MISSING
-| zlib1g-dev | | Compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] in relay plugin (weechat protocol), script plugin.
+| Pakiet ^(1)^ | Wersja | Features
+
+| kompilator C (gcc / clang) |
+| Kompilacja.
+
+| cmake | ≥ 3.0
+| Kompilacja (możliwe jest użycie autotools, jednak CMake jest zalecany).
+
+| pkg-config |
+| Wykrywa zainstalowane biblioteki.
+
+| libncursesw5-dev ^(2)^ |
+| Interfejs ncurses.
+
+| libcurl4-gnutls-dev |
+| Transfer URL.
+
+| libgcrypt20-dev |
+| Zabezpieczone dane, uwierzytelnianie IRC SASL.
+
+// TRANSLATION MISSING
+| libgnutls28-dev | ≥ 2.2.0 ^(3)^
+| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
+ Relay plugin: support of TLS connections.
+
// TRANSLATION MISSING
-| libzstd-dev | | Compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] in relay plugin (weechat protocol).
+| zlib1g-dev |
+| Logger plugin: compression of rotated log files (gzip). +
+ Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] (weechat protocol). +
+ Script plugin: read of repository index file (gzip).
+
+// TRANSLATION MISSING
+| libzstd-dev |
+| Logger plugin: compression of rotated log files. +
+ Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] (weechat protocol).
|===
[NOTE]
@@ -149,7 +173,8 @@ WeeChat:
[width="100%",cols="5,^3,.^15",options="header"]
|===
-| Pakiet ^(1)^ | Wersja | Opis
+// TRANSLATION MISSING
+| Pakiet ^(1)^ | Wersja | Features
| kompilator {cpp} (pass:[g++ / clang++]) | | Kompilacja i uruchamianie testów, wtyczka JavaScript.
| gettext | | Internacjonalizacja (tłumaczenie wiadomości; język bazowy to Angielski).
| ca-certificates | | Certyfikaty dla połączeń SSL.
diff --git a/doc/sr/includes/autogen_user_options.sr.adoc b/doc/sr/includes/autogen_user_options.sr.adoc
index 2a90b033e..0376808d3 100644
--- a/doc/sr/includes/autogen_user_options.sr.adoc
+++ b/doc/sr/includes/autogen_user_options.sr.adoc
@@ -1468,6 +1468,24 @@
** вредности: било који стринг
** подразумевана вредност: `+"_"+`
+* [[option_logger.file.rotation_compression_level]] *logger.file.rotation_compression_level*
+** опис: pass:none[compression level for rotated log files (with extension ".1", ".2", etc.), if option logger.file.rotation_compression_type is enabled: 1 = low compression / fast ... 100 = best compression / slow; the value is a percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is recommended, it offers a good compromise between compression and speed]
+** тип: целобројна
+** вредности: 1 .. 100
+** подразумевана вредност: `+20+`
+
+* [[option_logger.file.rotation_compression_type]] *logger.file.rotation_compression_type*
+** опис: pass:none[compression type for rotated log files; if set to "none", rotated log files are not compressed; WARNING: if rotation was enabled with another type of compression (or no compression), you must first unload the logger plugin, compress files with the new type (or decompress files), then change the option in logger.conf, then load the logger plugin]
+** тип: целобројна
+** вредности: none, gzip, zstd
+** подразумевана вредност: `+none+`
+
+* [[option_logger.file.rotation_size_max]] *logger.file.rotation_size_max*
+** опис: pass:none[when this size is reached, a rotation of log files is performed: the existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) and the current file is renamed with extension .1; an integer number with a suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = megabytes, g = gigabytes, t = terabytes; example: "2g" causes a rotation if the file size is > 2,000,000,000 bytes; if set to "0", no rotation is performed (unlimited log size); WARNING: before changing this option, you should first set the compression type via option logger.file.rotation_compression_type]
+** тип: стринг
+** вредности: било који стринг
+** подразумевана вредност: `+"0"+`
+
* [[option_logger.file.time_format]] *logger.file.time_format*
** опис: pass:none[временска ознака која се користи у лог фајловима (погледајте man strftime за спецификаторе датума/времена)]
** тип: стринг
diff --git a/doc/sr/weechat_user.sr.adoc b/doc/sr/weechat_user.sr.adoc
index 366df8a0d..dbfdbf601 100644
--- a/doc/sr/weechat_user.sr.adoc
+++ b/doc/sr/weechat_user.sr.adoc
@@ -106,16 +106,42 @@ https://github.com/weechat/weechat-container[weechat-container ^↗^,window=_bl
[width="100%", cols="5,^3,.^15", options="header"]
|===
-| Пакет ^(1)^ | Верзија | Служи за
-| C компајлер (gcc / clang) | | Изградњу.
-| cmake | ≥ 3.0 | Изградњу (може да се користи и autotools, али се препоручује CMake).
-| pkg-config | | Детекција инсталираних библиотека.
-| libncursesw5-dev ^(2)^ | | Ncurses интерфејс.
-| libcurl4-gnutls-dev | | URL пренос.
-| libgcrypt20-dev | | Обезбеђени подаци, IRC SASL аутентификација.
-| libgnutls28-dev | ≥ 2.2.0 ^(3)^ | SSL веза са IRC сервером, подршка за SSL у релеј додатку, IRC SASL аутентификација (ECDSA-NIST256P-CHALLENGE).
-| zlib1g-dev | | Компресија порука (WeeChat -> клијент) са https://zlib.net/[zlib ^↗^,window=_blank] у релеј додатку (weechat протокол), скрипт додатак.
-| libzstd-dev | | Компресија порука (WeeChat -> клијент) са https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] у релеј додатку (weechat протокол).
+// TRANSLATION MISSING
+| Пакет ^(1)^ | Верзија | Features
+
+| C компајлер (gcc / clang) |
+| Изградњу.
+
+| cmake | ≥ 3.0
+| Изградњу (може да се користи и autotools, али се препоручује CMake).
+
+| pkg-config |
+| Детекција инсталираних библиотека.
+
+| libncursesw5-dev ^(2)^ |
+| Ncurses интерфејс.
+
+| libcurl4-gnutls-dev |
+| URL пренос.
+
+| libgcrypt20-dev |
+| Обезбеђени подаци, IRC SASL аутентификација.
+
+// TRANSLATION MISSING
+| libgnutls28-dev | ≥ 2.2.0 ^(3)^
+| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
+ Relay plugin: support of TLS connections.
+
+// TRANSLATION MISSING
+| zlib1g-dev |
+| Logger plugin: compression of rotated log files (gzip). +
+ Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^,window=_blank] (weechat protocol). +
+ Script plugin: read of repository index file (gzip).
+
+// TRANSLATION MISSING
+| libzstd-dev |
+| Logger plugin: compression of rotated log files. +
+ Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^,window=_blank] (weechat protocol).
|===
[NOTE]
@@ -128,7 +154,8 @@ https://github.com/weechat/weechat-container[weechat-container ^↗^,window=_bl
[width="100%", cols="5,^3,.^15", options="header"]
|===
-| Пакет ^(1)^ | Верзија | Служи за
+// TRANSLATION MISSING
+| Пакет ^(1)^ | Верзија | Features
| {cpp} компајлер (pass:[g++ / clang++]) | | Изградњу и покретање тестова, JavaScript додатак.
| gettext | | Интернационализацију (превод порука; основни језик је енглески).
| ca-certificates | | Сертификате за SSL везе.
diff --git a/po/cs.po b/po/cs.po
index cac5124b0..83f68f287 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-06-18 16:11+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10216,18 +10216,6 @@ msgstr "%s%s: odpojen od serveru"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== konec backlogu (%d řádků) =========="
-#, fuzzy
-msgid "Log buffers to files"
-msgstr "konfigurační soubory"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: nemohu najít jméno souboru masky pro buffer \"%s\", logování pro tento "
-"buffer je vypnuto"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: nedostatek paměti"
@@ -10260,6 +10248,18 @@ msgstr "%s\t**** Začátek logu ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Konec logu ****"
+#, fuzzy
+msgid "Log buffers to files"
+msgstr "konfigurační soubory"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: nemohu najít jméno souboru masky pro buffer \"%s\", logování pro tento "
+"buffer je vypnuto"
+
msgid "Logging on buffers:"
msgstr "Loguji buffery:"
@@ -10443,6 +10443,34 @@ msgstr ""
"nahrazovací znak pro speciální znaky ve jménu souboru vytvářeného pomocí "
"masky (například dělič adresářů)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"časová známka použita v logovacích souborech (použijte manuálovou stránku "
diff --git a/po/de.po b/po/de.po
index c98c20a24..448dd6f73 100644
--- a/po/de.po
+++ b/po/de.po
@@ -25,7 +25,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-09-20 19:07+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -2183,72 +2183,6 @@ msgstr "Funktionen für die Befehlszeile"
msgid "<action> [<arguments>]"
msgstr "<action> [<arguments>]"
-#| msgid ""
-#| "list of actions:\n"
-#| " return: simulate key \"enter\"\n"
-#| " complete_next: complete word with next completion\n"
-#| " complete_previous: complete word with previous completion\n"
-#| " search_text_here: search text in buffer at current position\n"
-#| " search_text: search text in buffer\n"
-#| " search_switch_case: switch exact case for search\n"
-#| " search_switch_regex: switch search type: string/regular expression\n"
-#| " search_switch_where: switch search in messages/prefixes\n"
-#| " search_previous: search previous line\n"
-#| " search_next: search next line\n"
-#| " search_stop_here: stop search at current position\n"
-#| " search_stop: stop search\n"
-#| " delete_previous_char: delete previous char\n"
-#| " delete_next_char: delete next char\n"
-#| " delete_previous_word: delete previous word\n"
-#| " delete_next_word: delete next word\n"
-#| " delete_beginning_of_line: delete from beginning of line until cursor\n"
-#| " delete_end_of_line: delete from cursor until end of line\n"
-#| " delete_line: delete entire line\n"
-#| " clipboard_paste: paste from the internal clipboard\n"
-#| " transpose_chars: transpose two chars\n"
-#| " undo: undo last command line action\n"
-#| " redo: redo last command line action\n"
-#| " move_beginning_of_line: move cursor to beginning of line\n"
-#| " move_end_of_line: move cursor to end of line\n"
-#| " move_previous_char: move cursor to previous char\n"
-#| " move_next_char: move cursor to next char\n"
-#| " move_previous_word: move cursor to previous word\n"
-#| " move_next_word: move cursor to next word\n"
-#| " history_previous: recall previous command in current buffer history\n"
-#| " history_next: recall next command in current buffer history\n"
-#| " history_global_previous: recall previous command in global history\n"
-#| " history_global_next: recall next command in global history\n"
-#| " jump_smart: jump to next buffer with activity\n"
-#| " jump_last_buffer_displayed: jump to last buffer displayed (before last "
-#| "jump to a buffer)\n"
-#| " jump_previously_visited_buffer: jump to previously visited buffer\n"
-#| " jump_next_visited_buffer: jump to next visited buffer\n"
-#| " hotlist_clear: clear hotlist (optional argument: \"lowest\" to clear "
-#| "only lowest level in hotlist, \"highest\" to clear only highest level in "
-#| "hotlist, or level mask: integer which is a combination of 1=join/part, "
-#| "2=message, 4=private, 8=highlight)\n"
-#| " hotlist_remove_buffer: remove current buffer from hotlist\n"
-#| " hotlist_restore_buffer: restore latest hotlist removed in the current "
-#| "buffer\n"
-#| " hotlist_restore_all: restore latest hotlist removed in all buffers\n"
-#| " grab_key: grab a key (optional argument: delay for end of grab, default "
-#| "is 500 milliseconds)\n"
-#| " grab_key_command: grab a key with its associated command (optional "
-#| "argument: delay for end of grab, default is 500 milliseconds)\n"
-#| " grab_mouse: grab mouse event code\n"
-#| " grab_mouse_area: grab mouse event code with area\n"
-#| " set_unread: set unread marker for all buffers\n"
-#| " set_unread_current_buffer: set unread marker for current buffer\n"
-#| " switch_active_buffer: switch to next merged buffer\n"
-#| " switch_active_buffer_previous: switch to previous merged buffer\n"
-#| " zoom_merged_buffer: zoom on merged buffer\n"
-#| " insert: insert text in command line (escaped chars are allowed, see /"
-#| "help print)\n"
-#| " send: send text to the buffer\n"
-#| " paste_start: start paste (bracketed paste mode)\n"
-#| " paste_stop: stop paste (bracketed paste mode)\n"
-#| "\n"
-#| "This command is used by key bindings or plugins."
msgid ""
"list of actions:\n"
" return: simulate key \"enter\"\n"
@@ -2334,8 +2268,8 @@ msgstr ""
" delete_previous_char: entfernt vorheriges Zeichen\n"
" delete_next_char: entfernt nächstes Zeichen\n"
" delete_previous_word: entfernt vorheriges Wort\n"
-" delete_previous_word_whitespace: vorheriges Wort löschen (bis zum"
-" Leerzeichen)\n"
+" delete_previous_word_whitespace: vorheriges Wort löschen (bis zum "
+"Leerzeichen)\n"
" delete_next_word: entfernt nächstes Wort\n"
" delete_beginning_of_line: entfernt alle Zeichen ab Zeilenanfang bis zum "
"Cursor\n"
@@ -12339,11 +12273,9 @@ msgid "%s%s: SASL authentication timeout"
msgstr "%s%s: Zeitüberschreitung bei SASL Authentifizierung"
#, c-format
-#| msgid "%s%s: lag is high, reconnecting to server %s%s%s"
msgid "%s%s: lag is high, disconnecting from server %s%s%s"
msgstr ""
-"%s%s: Verzögerung ist hoch. Die Verbindung zum Server "
-"%s%s%s wird abgebrochen"
+"%s%s: Verzögerung ist hoch. Die Verbindung zum Server %s%s%s wird abgebrochen"
#, c-format
msgid "%s%s: reconnecting to server in %d %s, %d %s"
@@ -12557,17 +12489,6 @@ msgstr "%s%s: vom Server getrennt"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== Ende des Verlaufspeichers (%d Zeilen) =========="
-msgid "Log buffers to files"
-msgstr "Speichert Buffer in eine Datei"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: Es existiert keine Dateinamen-Maske für den Buffer \"%s\", "
-"Protokollierung ist für diesen Buffer ausgeschaltet"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: nicht genügend Speicher"
@@ -12603,6 +12524,17 @@ msgstr "%s\t**** Beginn der Protokoll-Datei ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Ende der Protokoll-Datei ****"
+msgid "Log buffers to files"
+msgstr "Speichert Buffer in eine Datei"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: Es existiert keine Dateinamen-Maske für den Buffer \"%s\", "
+"Protokollierung ist für diesen Buffer ausgeschaltet"
+
msgid "Logging on buffers:"
msgstr "Protokollieren der Buffer:"
@@ -12812,6 +12744,47 @@ msgstr ""
"Ersatzzeichen für Dateinamen, falls der Dateiname Sonderzeichen beinhaltet "
"(z.B. das Trennzeichen bei Verzeichnissen \"/\")"
+#, fuzzy
+#| msgid ""
+#| "compression of messages sent to clients with \"weechat\" protocol: 0 = "
+#| "disable compression, 1 = low compression / fast ... 100 = best "
+#| "compression / slow; the value is a percentage converted to 1-9 for zlib "
+#| "and 1-19 for zstd; the default value is recommended, it offers a good "
+#| "compromise between compression and speed"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+"Komprimierung von Nachrichten, die mittels \"weechat\" Protokoll an Clients "
+"gesendet werden: 0 = Komprimierung deaktivieren, 1 = geringe Komprimierung / "
+"schnell ... 100 = beste Komprimierung / langsam; dieser Wert ist eine "
+"Prozentangabe, welcher für zlib nach 1-9 und für zstd nach 1-19 umgewandelt "
+"wird; der Standardwert wird empfohlen, denn er bietet einen guten Kompromiss "
+"zwischen Kompression und Geschwindigkeit"
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"Zeitstempel in Protokoll-Datei nutzen (siehe man strftime, welche "
@@ -15061,7 +15034,6 @@ msgstr ""
msgid "%s dictionaries list:"
msgstr "%s Wörterbücher:"
-#| msgid "Spell checking is disabled"
msgid "spell checking disabled"
msgstr "Rechtschreibprüfung deaktiviert"
@@ -15126,9 +15098,6 @@ msgstr "Rechtschreibprüfung ist deaktiviert"
msgid "spell plugin configuration"
msgstr "Konfiguration für spell-Erweiterung"
-#| msgid ""
-#| "enable|disable|toggle || listdict || setdict <dict>[,<dict>...] || "
-#| "deldict || addword [<dict>] <word>"
msgid ""
"enable|disable|toggle || listdict || setdict -|<dict>[,<dict>...] || deldict "
"|| addword [<dict>] <word>"
@@ -15136,27 +15105,6 @@ msgstr ""
"enable|disable|toggle || listdict || setdict -|<dict>[,<dict>...] || deldict "
"|| addword [<dict>] <word>"
-#| msgid ""
-#| " enable: enable spell checker\n"
-#| " disable: disable spell checker\n"
-#| " toggle: toggle spell checker\n"
-#| "listdict: show installed dictionaries\n"
-#| " setdict: set dictionary for current buffer (multiple dictionaries can be "
-#| "separated by a comma)\n"
-#| " deldict: delete dictionary used on current buffer\n"
-#| " addword: add a word in personal dictionary\n"
-#| "\n"
-#| "Input line beginning with a '/' is not checked, except for some commands "
-#| "(see /set spell.check.commands).\n"
-#| "\n"
-#| "To enable spell checker on all buffers, use option \"default_dict\", then "
-#| "enable spell checker, for example:\n"
-#| " /set spell.check.default_dict \"en\"\n"
-#| " /spell enable\n"
-#| "\n"
-#| "To display a list of suggestions in a bar, use item \"spell_suggest\".\n"
-#| "\n"
-#| "Default key to toggle spell checker is alt-s."
msgid ""
" enable: enable spell checker\n"
" disable: disable spell checker\n"
@@ -15186,8 +15134,8 @@ msgstr ""
"listdict: die, auf dem System, installierten Wörterbücher werden "
"aufgelistet\n"
" setdict: Wörterbuch für den aktuellen Buffer einstellen (mehrere "
-"Wörterbücher müssen durch Kommata getrennt werden (spezieller Wert \"-"
-"\" deaktiviert die Rechtschreibprüfung für den aktuellen Buffer))\n"
+"Wörterbücher müssen durch Kommata getrennt werden (spezieller Wert \"-\" "
+"deaktiviert die Rechtschreibprüfung für den aktuellen Buffer))\n"
" deldict: Wörterbuch für den aktuellen Buffer entfernen\n"
" addword: fügt ein Wort in das persönliche Wörterbuch hinzu\n"
"\n"
@@ -15212,14 +15160,13 @@ msgstr "Liste aller Sprachen die unterstützt werden"
msgid "list of installed dictionaries"
msgstr "Auflistung der installierten Wörterbücher"
-#| msgid "comma separated list of dictionaries to use on this buffer"
msgid ""
"comma separated list of dictionaries to use on this buffer (special value \"-"
"\" disables spell checking on this buffer)"
msgstr ""
-"durch Komma getrennte Liste von Wörterbüchern, die in diesem Buffer verwendet"
-" werden sollen (spezieller Wert \"-"
-"\" deaktiviert die Rechtschreibprüfung für diesen Buffer)"
+"durch Komma getrennte Liste von Wörterbüchern, die in diesem Buffer "
+"verwendet werden sollen (spezieller Wert \"-\" deaktiviert die "
+"Rechtschreibprüfung für diesen Buffer)"
#, c-format
msgid "%s%s: error creating spell dictionary \"%s\" => \"%s\""
@@ -15546,8 +15493,7 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat"
msgid ""
"list|listfull|listdefault || add|addoff|addreplace <name> <hook> "
-"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
-"return_code>\" [\"<post_action>\"]]]]]] "
+"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
@@ -15555,8 +15501,7 @@ msgid ""
"monitor [<filter>]"
msgstr ""
"list|listfull|listdefault || add|addoff|addreplace <name> <hook> "
-"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
-"return_code>\" [\"<post_action>\"]]]]]] "
+"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
diff --git a/po/es.po b/po/es.po
index 21b7c8e11..2863e58c9 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-06-18 16:11+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10879,17 +10879,6 @@ msgstr "%s%s: desconectado del servidor"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== Fin del último registro (%d líneas) =========="
-msgid "Log buffers to files"
-msgstr "Guardar registro de buffers"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: imposible encontrar la máscara del nombre del archivo para el buffer "
-"\"%s\", registro desactivado para este buffer"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: no hay suficiente memoria"
@@ -10922,6 +10911,17 @@ msgstr "%s\t**** Comienzo del registro ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Fin del registro ****"
+msgid "Log buffers to files"
+msgstr "Guardar registro de buffers"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: imposible encontrar la máscara del nombre del archivo para el buffer "
+"\"%s\", registro desactivado para este buffer"
+
msgid "Logging on buffers:"
msgstr "Guardando registro en los buffers:"
@@ -11112,6 +11112,34 @@ msgstr ""
"carácter de reemplazo para caracteres especiales en el nombre de archivo "
"construido desde una máscara (como el delimitador de directorios)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"formato de hora en el registro (ver el manual de strftime para los "
diff --git a/po/fr.po b/po/fr.po
index cd6013a82..ba5a374c9 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: 2022-09-18 23:16+0200\n"
-"PO-Revision-Date: 2022-09-18 23:21+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
+"PO-Revision-Date: 2022-09-28 20:51+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -12227,17 +12227,6 @@ msgstr "%s%s : déconnecté du serveur"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== Fin de l'historique (%d lignes) =========="
-msgid "Log buffers to files"
-msgstr "Enregistrement des tampons dans des fichiers"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s : impossible de trouver le masque de nom de fichier pour le tampon "
-"\"%s\", l'enregistrement est désactivé pour ce tampon"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s : pas assez de mémoire"
@@ -12271,6 +12260,17 @@ msgstr "%s\t**** Début du log ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Fin du log ****"
+msgid "Log buffers to files"
+msgstr "Enregistrement des tampons dans des fichiers"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s : impossible de trouver le masque de nom de fichier pour le tampon "
+"\"%s\", l'enregistrement est désactivé pour ce tampon"
+
msgid "Logging on buffers:"
msgstr "Enregistrement des tampons :"
@@ -12477,6 +12477,56 @@ msgstr ""
"caractère de remplacement dans le nom de fichier construit avec le masque "
"(comme le délimiteur de répertoire)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+"niveau de compression pour les fichiers de log qui tournent (avec extension "
+"\".1\", \".2\", etc.), si l'option logger.file.rotation_compression_type est "
+"activée ; 1 = peu de compression / rapide ... 100 = meilleure compression / "
+"lent ; la valeur est un pourcentage converti de 1 à 9 pour gzip et de 1 à 19 "
+"pour zstd ; la valeur par défaut est recommandée, elle offre un bon "
+"compromis compression/vitesse"
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+"type de compression pour les fichiers de log qui tournent ; si défini à "
+"\"none\", les fichiers de logs qui tournent ne sont pas compressés ; "
+"ATTENTION : si la rotation est activée avec un autre type de compression (ou "
+"pas de compression), vous devez d'abord décharger l'extension logger, "
+"compresser les fichiers avec le nouveau type (ou décompresser les fichiers), "
+"puis changer l'option dans logger.conf, puis charger l'extension logger"
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+"lorsque cette taille est atteinte, une rotation des fichiers est effectuée : "
+"les fichiers de log existants sont renommés (.1 devient .2, .2 devient .3, "
+"etc.) et le fichier courant est renommé avec l'extension .1 ; un nombre "
+"entier avec un suffixe est accepté : b = octets (par défaut si pas d'unité "
+"spécifiée), k = kilo-octets, m = méga-octets, g = giga-octets, t = téra-"
+"octets ; exemple : \"2g\" provoque une rotation si la taille du fichier est "
+"> 2 000 000 000 octets ; si défini à \"0\", aucune rotation n'est effectuée "
+"(taille de log illimitée) ; ATTENTION : avant de changer cette option, vous "
+"devriez d'abord définir le type de compression via l'option logger.file."
+"rotation_compression_type"
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"format de date/heure utilisé dans les fichiers log (voir man strftime pour "
diff --git a/po/hu.po b/po/hu.po
index dbad9fb72..089485d90 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9701,16 +9701,6 @@ msgstr "Lekapcsolódott a szerverről!\n"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr ""
-#, fuzzy
-msgid "Log buffers to files"
-msgstr "szerver konfigurációs fájljának újraolvastatása"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-
#, fuzzy, c-format
msgid "%s%s: not enough memory"
msgstr "Nincs elég memória az új sorhoz\n"
@@ -9742,6 +9732,16 @@ msgid "%s\t**** End of log ****"
msgstr "**** Naplófájl vége "
#, fuzzy
+msgid "Log buffers to files"
+msgstr "szerver konfigurációs fájljának újraolvastatása"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+
+#, fuzzy
msgid "Logging on buffers:"
msgstr "Aliaszok listája:\n"
@@ -9880,6 +9880,34 @@ msgid ""
"directory delimiter)"
msgstr ""
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
diff --git a/po/it.po b/po/it.po
index 6ecc2b4ac..bdcb5fa4a 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10669,17 +10669,6 @@ msgstr "%s%s: disconnesso dal server"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== Fine della cronologia (%d righe) =========="
-msgid "Log buffers to files"
-msgstr "Registra i buffer su file"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: impossibile trovare la mask del nome del file per il buffer \"%s\", "
-"logging disabilitato per questo buffer"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: memoria non sufficiente"
@@ -10712,6 +10701,17 @@ msgstr "%s\t**** Inizio del log ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Fine del log ****"
+msgid "Log buffers to files"
+msgstr "Registra i buffer su file"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: impossibile trovare la mask del nome del file per il buffer \"%s\", "
+"logging disabilitato per questo buffer"
+
msgid "Logging on buffers:"
msgstr "Logging sui buffer:"
@@ -10903,6 +10903,34 @@ msgstr ""
"carattere di sostituzione per i caratteri speciali nei nomi dei file salvati "
"con la mask (come il delimitatore di directory)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"data e ora usati nei file di log (consultare man strftime per gli "
diff --git a/po/ja.po b/po/ja.po
index eabee32d3..ee3c98c5a 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-06-18 16:12+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -11669,17 +11669,6 @@ msgstr "%s%s: サーバから切断"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== バックログの最後 (%d 行) =========="
-msgid "Log buffers to files"
-msgstr "ファイルにバッファログを保存"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: バッファ \"%s\" のファイル名マスクが見つかりません、ログ保存を無効化し"
-"ています"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: メモリが足りません"
@@ -11712,6 +11701,17 @@ msgstr "%s\t**** ログの最初 ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** ログの最後 ****"
+msgid "Log buffers to files"
+msgstr "ファイルにバッファログを保存"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: バッファ \"%s\" のファイル名マスクが見つかりません、ログ保存を無効化し"
+"ています"
+
msgid "Logging on buffers:"
msgstr "バッファのログ保存:"
@@ -11900,6 +11900,34 @@ msgstr ""
"マスクと一緒に使われたときのファイル名に含まれる特殊文字に対応する置換文字 "
"(ディレクトリ区切りのようなもの)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"ログファイルで使用するタイムスタンプ (日付/時間指定子は strftime の man 参照)"
diff --git a/po/pl.po b/po/pl.po
index ca2fa1142..d89225962 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-06-18 16:12+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -12278,17 +12278,6 @@ msgstr "%s%s: rozłączono z serwerem"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== Koniec backloga (%d linii) =========="
-msgid "Log buffers to files"
-msgstr "Zapisuj bufory do plików"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: nie można odnaleźć maski pliku dla bufora \"%s\", logowanie dla tego "
-"bufora zostaje wyłączone"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: za mało pamięci"
@@ -12321,6 +12310,17 @@ msgstr "%s\t**** Początek logu ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Koniec logu ****"
+msgid "Log buffers to files"
+msgstr "Zapisuj bufory do plików"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: nie można odnaleźć maski pliku dla bufora \"%s\", logowanie dla tego "
+"bufora zostaje wyłączone"
+
msgid "Logging on buffers:"
msgstr "Loguje w buforach:"
@@ -12522,6 +12522,34 @@ msgstr ""
"znak zastępczy dla znaków specjalnych w plikach stworzonych przy użyciu "
"maski (jak separator katalogów)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"format czasu użyty w plikach z logami (zobacz man strftime dla "
diff --git a/po/pt.po b/po/pt.po
index bcd8021c6..d9096cb38 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-06-18 16:12+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -11482,17 +11482,6 @@ msgstr "%s%s: desconectado do servidor"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s====== Fim do registo recente (%d linhas) ====="
-msgid "Log buffers to files"
-msgstr "Registar buffers em ficheiros"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: não foi possível encontrar máscara de ficheiro do buffer \"%s\", o "
-"registo deste buffer está desativado"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: memória insuficiente"
@@ -11525,6 +11514,17 @@ msgstr "%s\t**** Início do registo ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Fim do registo ****"
+msgid "Log buffers to files"
+msgstr "Registar buffers em ficheiros"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: não foi possível encontrar máscara de ficheiro do buffer \"%s\", o "
+"registo deste buffer está desativado"
+
msgid "Logging on buffers:"
msgstr "A registar os buffers:"
@@ -11711,6 +11711,34 @@ msgstr ""
"caráter para substituir carateres especiais no nome do ficheiro construído "
"com a máscara (tais como delimitadores de diretório)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"carimbo de data/hora usado nos ficheiros de registo (ver man strftime para "
diff --git a/po/pt_BR.po b/po/pt_BR.po
index c511cc417..54b1b7fe3 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10189,18 +10189,6 @@ msgstr "%s%s: desconectado do servidor"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "===\t========== Fim do backlog (%d linhas) =========="
-#, fuzzy
-msgid "Log buffers to files"
-msgstr "arquivos de configuração"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: não foi possível encontrar máscara de nome de arquigo para o buffer "
-"\"%s\", o registro está desabilitado para este buffer"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: memória insuficiente"
@@ -10234,6 +10222,18 @@ msgstr "%s\t*** Início do registro ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Final do registro ****"
+#, fuzzy
+msgid "Log buffers to files"
+msgstr "arquivos de configuração"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: não foi possível encontrar máscara de nome de arquigo para o buffer "
+"\"%s\", o registro está desabilitado para este buffer"
+
msgid "Logging on buffers:"
msgstr "Registrando buffers:"
@@ -10391,6 +10391,34 @@ msgstr ""
"caractere de substituição para caracteres especiais em nome de arquivo feito "
"com máscara (como delimitador de diretório)"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"marca de tempo utilizada nos arquivos de registro (veja \"man strftime\" "
diff --git a/po/ru.po b/po/ru.po
index c54032f9e..5ba12b46d 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9740,16 +9740,6 @@ msgstr "Отключен от сервера!\n"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr ""
-#, fuzzy
-msgid "Log buffers to files"
-msgstr "перезагрузить конфигурационный файл сервера"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-
#, fuzzy, c-format
msgid "%s%s: not enough memory"
msgstr "Недостаточно памяти для новой строчки\n"
@@ -9781,6 +9771,16 @@ msgid "%s\t**** End of log ****"
msgstr "**** Конец log-файла"
#, fuzzy
+msgid "Log buffers to files"
+msgstr "перезагрузить конфигурационный файл сервера"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+
+#, fuzzy
msgid "Logging on buffers:"
msgstr "Список сокращений:\n"
@@ -9918,6 +9918,34 @@ msgid ""
"directory delimiter)"
msgstr ""
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
diff --git a/po/sr.po b/po/sr.po
index ad4e63969..808f8d803 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-07-06 08:29+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11998,17 +11998,6 @@ msgstr "%s%s: прекинута је веза са сервером"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== Крај старијих уноса (%d линија) =========="
-msgid "Log buffers to files"
-msgstr "Логовање бафера у фајл"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: маска имена фајлова за бафер „%s” не може да се пронађе, логовање је "
-"искључено за овај бафер"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: нема довољно слободне меморије"
@@ -12041,6 +12030,17 @@ msgstr "%s\t**** Почетак лога ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Крај лога ****"
+msgid "Log buffers to files"
+msgstr "Логовање бафера у фајл"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: маска имена фајлова за бафер „%s” не може да се пронађе, логовање је "
+"искључено за овај бафер"
+
msgid "Logging on buffers:"
msgstr "Логовање бафера:"
@@ -12238,6 +12238,46 @@ msgstr ""
"карактер који замењује специјалне карактере у именима фајлова која се "
"изграђују помоћу маске (као што је граничник за директоријуме)"
+#, fuzzy
+#| msgid ""
+#| "compression of messages sent to clients with \"weechat\" protocol: 0 = "
+#| "disable compression, 1 = low compression / fast ... 100 = best "
+#| "compression / slow; the value is a percentage converted to 1-9 for zlib "
+#| "and 1-19 for zstd; the default value is recommended, it offers a good "
+#| "compromise between compression and speed"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+"компресија порука које се клијентима шаљу „weechat” протоколом: 0 = без "
+"компресије, 1 = ниска компресија / брзо ... 100 = најбоља компресија / "
+"споро; вредност је проценат који се конвертује у 1-9 за zlib и 1-19 за zstd; "
+"препоручује се подразумевана вредност јер нуди добар компромис између "
+"компресије и брзине"
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"временска ознака која се користи у лог фајловима (погледајте man strftime за "
diff --git a/po/tr.po b/po/tr.po
index 8cfb87e3f..2c475ba02 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+0200\n"
"PO-Revision-Date: 2022-07-27 23:00+0300\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11901,17 +11901,6 @@ msgstr "%s%s: Sunucu bağlantısı kesildi"
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr "%s===\t%s========== Biriken günlük sonu (%d satır) =========="
-msgid "Log buffers to files"
-msgstr "Arabellekleri dosyalara günlükle"
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-"%s%s: \"%s\" arabelleği için dosya adı maskesi bulunamıyor, bu arabellek "
-"için günlükleme devre dışı"
-
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: Yetersiz bellek"
@@ -11945,6 +11934,17 @@ msgstr "%s\t**** Günlük başlangıcı ****"
msgid "%s\t**** End of log ****"
msgstr "%s\t**** Günlük sonu ****"
+msgid "Log buffers to files"
+msgstr "Arabellekleri dosyalara günlükle"
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+"%s%s: \"%s\" arabelleği için dosya adı maskesi bulunamıyor, bu arabellek "
+"için günlükleme devre dışı"
+
msgid "Logging on buffers:"
msgstr "Şu arabellekler günlükleniyor:"
@@ -12147,6 +12147,46 @@ msgstr ""
"maskeyle yapılmış dosya adlarındaki özel karakterler için değişiklik "
"karakteri (dizin sınırlayıcısı gibi)"
+#, fuzzy
+#| msgid ""
+#| "compression of messages sent to clients with \"weechat\" protocol: 0 = "
+#| "disable compression, 1 = low compression / fast ... 100 = best "
+#| "compression / slow; the value is a percentage converted to 1-9 for zlib "
+#| "and 1-19 for zstd; the default value is recommended, it offers a good "
+#| "compromise between compression and speed"
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+"istemcilere \"weechat\"protokolü ile gönderilen iletilerin sıkıştırması: 0 = "
+"sıkıştırma kapalı, 1 = düşük sıkıştırma / hızlı ... 100 = en iyi "
+"sıkıştırma / yavaş; değer, zlib için 1-9'a, zstd izin 1-19'a dönüştürülen "
+"bir yüzdedir; öntanımlı değer önerilir, hız ve sıkıştırma için iyi bir denge "
+"sunar"
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
"günlük dosyalarında kullanılan zaman damgası (tarih/zaman belirticileri için "
diff --git a/po/weechat.pot b/po/weechat.pot
index b6db46a45..ec1d06b18 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: 2022-09-18 23:16+0200\n"
+"POT-Creation-Date: 2022-09-28 20:50+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"
@@ -8748,15 +8748,6 @@ msgstr ""
msgid "%s===\t%s========== End of backlog (%d lines) =========="
msgstr ""
-msgid "Log buffers to files"
-msgstr ""
-
-#, c-format
-msgid ""
-"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
-"for this buffer"
-msgstr ""
-
#, c-format
msgid "%s%s: not enough memory"
msgstr ""
@@ -8787,6 +8778,15 @@ msgstr ""
msgid "%s\t**** End of log ****"
msgstr ""
+msgid "Log buffers to files"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s%s: unable to find filename mask for buffer \"%s\", logging is disabled "
+"for this buffer"
+msgstr ""
+
msgid "Logging on buffers:"
msgstr ""
@@ -8921,6 +8921,34 @@ msgid ""
"directory delimiter)"
msgstr ""
+msgid ""
+"compression level for rotated log files (with extension \".1\", \".2\", "
+"etc.), if option logger.file.rotation_compression_type is enabled: 1 = low "
+"compression / fast ... 100 = best compression / slow; the value is a "
+"percentage converted to 1-9 for gzip and 1-19 for zstd; the default value is "
+"recommended, it offers a good compromise between compression and speed"
+msgstr ""
+
+msgid ""
+"compression type for rotated log files; if set to \"none\", rotated log "
+"files are not compressed; WARNING: if rotation was enabled with another type "
+"of compression (or no compression), you must first unload the logger plugin, "
+"compress files with the new type (or decompress files), then change the "
+"option in logger.conf, then load the logger plugin"
+msgstr ""
+
+msgid ""
+"when this size is reached, a rotation of log files is performed: the "
+"existing rotated log files are renamed (.1 becomes .2, .2 becomes .3, etc.) "
+"and the current file is renamed with extension .1; an integer number with a "
+"suffix is allowed: b = bytes (default if no unit given), k = kilobytes, m = "
+"megabytes, g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+"if the file size is > 2,000,000,000 bytes; if set to \"0\", no rotation is "
+"performed (unlimited log size); WARNING: before changing this option, you "
+"should first set the compression type via option logger.file."
+"rotation_compression_type"
+msgstr ""
+
msgid "timestamp used in log files (see man strftime for date/time specifiers)"
msgstr ""
diff --git a/src/plugins/logger/logger-backlog.c b/src/plugins/logger/logger-backlog.c
index 724725aa5..c4cc0af48 100644
--- a/src/plugins/logger/logger-backlog.c
+++ b/src/plugins/logger/logger-backlog.c
@@ -244,7 +244,7 @@ logger_backlog_signal_cb (const void *pointer, void *data,
if (ptr_logger_buffer && ptr_logger_buffer->log_enabled)
{
if (!ptr_logger_buffer->log_filename)
- logger_set_log_filename (ptr_logger_buffer);
+ logger_buffer_set_log_filename (ptr_logger_buffer);
if (ptr_logger_buffer->log_filename)
{
ptr_logger_buffer->log_enabled = 0;
diff --git a/src/plugins/logger/logger-buffer.c b/src/plugins/logger/logger-buffer.c
index b1925033a..17cf08ce2 100644
--- a/src/plugins/logger/logger-buffer.c
+++ b/src/plugins/logger/logger-buffer.c
@@ -26,12 +26,18 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <errno.h>
+#include <sys/stat.h>
#include "../weechat-plugin.h"
#include "logger.h"
#include "logger-buffer.h"
+#include "logger-config.h"
+char *logger_buffer_compression_extension[LOGGER_BUFFER_NUM_COMPRESSION_TYPES] =
+{ "", ".gz", ".zst" };
+
struct t_logger_buffer *logger_buffers = NULL;
struct t_logger_buffer *last_logger_buffer = NULL;
@@ -96,6 +102,7 @@ logger_buffer_add (struct t_gui_buffer *buffer, int log_level)
new_logger_buffer->log_level = log_level;
new_logger_buffer->write_start_info_line = 1;
new_logger_buffer->flush_needed = 0;
+ new_logger_buffer->compressing = 0;
new_logger_buffer->prev_buffer = last_logger_buffer;
new_logger_buffer->next_buffer = NULL;
@@ -160,6 +167,687 @@ logger_buffer_search_log_filename (const char *log_filename)
}
/*
+ * Sets log filename for a logger buffer.
+ */
+
+void
+logger_buffer_set_log_filename (struct t_logger_buffer *logger_buffer)
+{
+ char *log_filename, *pos_last_sep;
+ char *dir_separator;
+ struct t_logger_buffer *ptr_logger_buffer;
+
+ /* get log filename for buffer */
+ log_filename = logger_get_filename (logger_buffer->buffer);
+ if (!log_filename)
+ {
+ weechat_printf_date_tags (NULL, 0, "no_log",
+ _("%s%s: not enough memory"),
+ weechat_prefix ("error"),
+ LOGGER_PLUGIN_NAME);
+ return;
+ }
+
+ /* log file is already used by another buffer? */
+ ptr_logger_buffer = logger_buffer_search_log_filename (log_filename);
+ if (ptr_logger_buffer)
+ {
+ weechat_printf_date_tags (
+ NULL, 0, "no_log",
+ _("%s%s: unable to start logging for buffer "
+ "\"%s\": filename \"%s\" is already used by "
+ "another buffer (check your log settings)"),
+ weechat_prefix ("error"),
+ LOGGER_PLUGIN_NAME,
+ weechat_buffer_get_string (logger_buffer->buffer, "name"),
+ log_filename);
+ free (log_filename);
+ return;
+ }
+
+ /* create directory for path in "log_filename" */
+ dir_separator = weechat_info_get ("dir_separator", "");
+ if (dir_separator)
+ {
+ pos_last_sep = strrchr (log_filename, dir_separator[0]);
+ if (pos_last_sep)
+ {
+ pos_last_sep[0] = '\0';
+ weechat_mkdir_parents (log_filename, 0700);
+ pos_last_sep[0] = dir_separator[0];
+ }
+ free (dir_separator);
+ }
+
+ /* set log filename */
+ logger_buffer->log_filename = log_filename;
+}
+
+/*
+ * Creates a log file.
+ *
+ * Returns:
+ * 1: OK
+ * 0: error
+ */
+
+int
+logger_buffer_create_log_file (struct t_logger_buffer *logger_buffer)
+{
+ char *charset, *message, buf_time[256], buf_beginning[1024];
+ int log_level, rc;
+ time_t seconds;
+ struct tm *date_tmp;
+ struct stat statbuf;
+
+ if (logger_buffer->log_file)
+ {
+ /*
+ * check that the inode has not changed, otherwise that means the file
+ * was deleted, and we must reopen it
+ */
+ rc = stat (logger_buffer->log_filename, &statbuf);
+ if ((rc == 0) && (statbuf.st_ino == logger_buffer->log_file_inode))
+ {
+ /* inode has not changed, we can write in this file */
+ return 1;
+ }
+ fclose (logger_buffer->log_file);
+ logger_buffer->log_file = NULL;
+ logger_buffer->log_file_inode = 0;
+ }
+
+ /* get log level */
+ log_level = logger_get_level_for_buffer (logger_buffer->buffer);
+ if (log_level == 0)
+ return 0;
+
+ /* create directory */
+ if (!logger_create_directory ())
+ {
+ weechat_printf_date_tags (
+ NULL, 0, "no_log",
+ _("%s%s: unable to create directory for logs "
+ "(\"%s\")"),
+ weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
+ weechat_config_string (logger_config_file_path));
+ return 0;
+ }
+ if (!logger_buffer->log_filename)
+ logger_buffer_set_log_filename (logger_buffer);
+ if (!logger_buffer->log_filename)
+ return 0;
+
+ /* create or append to log file */
+ logger_buffer->log_file =
+ fopen (logger_buffer->log_filename, "a");
+ if (!logger_buffer->log_file)
+ {
+ weechat_printf_date_tags (
+ NULL, 0, "no_log",
+ _("%s%s: unable to write log file \"%s\": %s"),
+ weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
+ logger_buffer->log_filename, strerror (errno));
+ return 0;
+ }
+
+ /* get file inode */
+ rc = stat (logger_buffer->log_filename, &statbuf);
+ if (rc != 0)
+ {
+ weechat_printf_date_tags (
+ NULL, 0, "no_log",
+ _("%s%s: unable to get file status of log file \"%s\": %s"),
+ weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
+ logger_buffer->log_filename, strerror (errno));
+ fclose (logger_buffer->log_file);
+ logger_buffer->log_file = NULL;
+ logger_buffer->log_file_inode = 0;
+ return 0;
+ }
+ logger_buffer->log_file_inode = statbuf.st_ino;
+
+ /* write info line */
+ if (weechat_config_boolean (logger_config_file_info_lines)
+ && logger_buffer->write_start_info_line)
+ {
+ buf_time[0] = '\0';
+ seconds = time (NULL);
+ date_tmp = localtime (&seconds);
+ 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';
+ }
+ snprintf (buf_beginning, sizeof (buf_beginning),
+ _("%s\t**** Beginning of log ****"),
+ buf_time);
+ charset = weechat_info_get ("charset_terminal", "");
+ message = (charset) ?
+ weechat_iconv_from_internal (charset, buf_beginning) : NULL;
+ fprintf (logger_buffer->log_file,
+ "%s\n", (message) ? message : buf_beginning);
+ if (charset)
+ free (charset);
+ if (message)
+ free (message);
+ logger_buffer->flush_needed = 1;
+ }
+ logger_buffer->write_start_info_line = 0;
+
+ return 1;
+}
+
+/*
+ * Compresses a log file, in the child process.
+ */
+
+void
+logger_buffer_compress_file (struct t_logger_buffer *logger_buffer)
+{
+ char filename[PATH_MAX], new_filename[PATH_MAX];
+ const char *ptr_extension;
+ int compression_type, compression_level;
+
+ compression_type = weechat_config_integer (
+ logger_config_file_rotation_compression_type);
+ ptr_extension = logger_buffer_compression_extension[compression_type];
+
+ snprintf (filename, sizeof (filename),
+ "%s.1",
+ logger_buffer->log_filename);
+ snprintf (new_filename, sizeof (new_filename),
+ "%s.1%s",
+ logger_buffer->log_filename,
+ ptr_extension);
+
+ compression_level = weechat_config_integer (
+ logger_config_file_rotation_compression_level);
+
+ switch (compression_type)
+ {
+ case LOGGER_BUFFER_COMPRESSION_GZIP:
+ if (weechat_file_compress (filename, new_filename,
+ "gzip", compression_level))
+ {
+ unlink (filename);
+ }
+ break;
+ case LOGGER_BUFFER_COMPRESSION_ZSTD:
+ if (weechat_file_compress (filename, new_filename,
+ "zstd", compression_level))
+ {
+ unlink (filename);
+ }
+ break;
+ default:
+ break;
+ }
+
+ exit (0);
+}
+
+/*
+ * Compression callback.
+ */
+
+int
+logger_buffer_compress_cb (const void *pointer, void *data,
+ const char *command, int return_code,
+ const char *out, const char *err)
+{
+ struct t_logger_buffer *logger_buffer;
+
+ /* make C compiler happy */
+ (void) data;
+ (void) command;
+ (void) return_code;
+ (void) out;
+ (void) err;
+
+ logger_buffer = (struct t_logger_buffer *)pointer;
+ if (!logger_buffer_valid (logger_buffer))
+ return WEECHAT_RC_OK;
+
+ if (return_code == WEECHAT_HOOK_PROCESS_CHILD)
+ {
+ logger_buffer_compress_file (logger_buffer);
+ }
+ else if (return_code >= 0)
+ {
+ logger_buffer->compressing = 0;
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
+ * Rotates a log file if needed (rotation enabled and max size reached).
+ *
+ * For example if we have these log files:
+ *
+ * irc.libera.#test.weechatlog (current log file)
+ * irc.libera.#test.weechatlog.1
+ * irc.libera.#test.weechatlog.2
+ *
+ * The following renames are done in this order:
+ *
+ * irc.libera.#test.weechatlog.2 -> irc.libera.#test.weechatlog.3
+ * irc.libera.#test.weechatlog.1 -> irc.libera.#test.weechatlog.2
+ * irc.libera.#test.weechatlog -> irc.libera.#test.weechatlog.1
+ *
+ * And in case of compressed log files:
+ *
+ * irc.libera.#test.weechatlog.2.gz -> irc.libera.#test.weechatlog.3.gz
+ * irc.libera.#test.weechatlog.1.gz -> irc.libera.#test.weechatlog.2.gz
+ * irc.libera.#test.weechatlog -> irc.libera.#test.weechatlog.1
+ *
+ * Then the file irc.libera.#test.weechatlog is created again.
+ */
+
+void
+logger_buffer_rotate (struct t_logger_buffer *logger_buffer)
+{
+ int compression_type, extension_index, found_comp, found_not_comp, i;
+ char filename[PATH_MAX], new_filename[PATH_MAX];
+ const char *ptr_extension;
+ struct stat st;
+
+ /* do not rotate if compression of log file is running */
+ if (logger_buffer->compressing)
+ return;
+
+ /* do not rotate if rotation is disabled */
+ if (logger_config_rotation_size_max == 0)
+ return;
+
+ /* do not rotate if max size is not reached */
+ if (fstat (fileno (logger_buffer->log_file), &st) != 0)
+ return;
+ if (st.st_size <= (long int)logger_config_rotation_size_max)
+ return;
+
+ if (weechat_logger_plugin->debug)
+ {
+ weechat_log_printf ("logger: rotation for log: \"%s\"",
+ logger_buffer->log_filename);
+ }
+
+ compression_type = weechat_config_integer (
+ logger_config_file_rotation_compression_type);
+ ptr_extension = logger_buffer_compression_extension[compression_type];
+
+ /* find the highest existing extension index */
+ extension_index = 1;
+ while (1)
+ {
+ found_comp = 0;
+ found_not_comp = 0;
+ if (ptr_extension[0])
+ {
+ /* try compressed file */
+ snprintf (filename, sizeof (filename),
+ "%s.%d%s",
+ logger_buffer->log_filename,
+ extension_index,
+ ptr_extension);
+ found_comp = (access (filename, F_OK) == 0);
+ }
+ if (!found_comp)
+ {
+ /* try non-compressed file */
+ snprintf (filename, sizeof (filename),
+ "%s.%d",
+ logger_buffer->log_filename,
+ extension_index);
+ found_not_comp = (access (filename, F_OK) == 0);
+ }
+ if (!found_comp && !found_not_comp)
+ break;
+
+ extension_index++;
+ }
+ extension_index--;
+
+ /* close current log file */
+ fclose (logger_buffer->log_file);
+ logger_buffer->log_file = NULL;
+ logger_buffer->log_file_inode = 0;
+
+ /*
+ * rename all files with an extension, starting with the higher one
+ *
+ * example with no compression enabled:
+ * .2" -> ".3" then ".1" -> ".2" then "" -> ".1"
+ *
+ * example with gzip compression:
+ * ".2.gz" -> ".3.gz" then ".1.gz" -> ".2.gz" then "" -> ".1"
+ */
+ for (i = extension_index; i >= 0; i--)
+ {
+ if (i == 0)
+ {
+ /* rename current log file to ".1" (no compression for now) */
+ snprintf (filename, sizeof (filename),
+ "%s",
+ logger_buffer->log_filename);
+ snprintf (new_filename, sizeof (new_filename),
+ "%s.%d",
+ logger_buffer->log_filename,
+ i + 1);
+ }
+ else
+ {
+ /* rename ".N" to ".N+1" */
+ filename[0] = '\0';
+
+ if (ptr_extension[0])
+ {
+ /* try compressed file */
+ snprintf (filename, sizeof (filename),
+ "%s.%d%s",
+ logger_buffer->log_filename,
+ i,
+ ptr_extension);
+ if (access (filename, F_OK) == 0)
+ {
+ /* compressed file found, go on */
+ snprintf (new_filename, sizeof (new_filename),
+ "%s.%d%s",
+ logger_buffer->log_filename,
+ i + 1,
+ ptr_extension);
+ }
+ else
+ {
+ filename[0] = '\0';
+ }
+ }
+ if (!filename[0])
+ {
+ /* non-compressed file */
+ snprintf (filename, sizeof (filename),
+ "%s.%d",
+ logger_buffer->log_filename,
+ i);
+ snprintf (new_filename, sizeof (filename),
+ "%s.%d",
+ logger_buffer->log_filename,
+ i + 1);
+ }
+ }
+ if (weechat_logger_plugin->debug)
+ {
+ weechat_log_printf ("logger: renaming \"%s\" to \"%s\"",
+ filename,
+ new_filename);
+ }
+ if (rename (filename, new_filename) != 0)
+ break;
+ }
+
+ if (compression_type != LOGGER_BUFFER_COMPRESSION_NONE)
+ {
+ /* compress rotated log file */
+ if (weechat_logger_plugin->debug)
+ {
+ weechat_log_printf ("logger: compressing \"%s.1\" => \"%s.1%s\"",
+ logger_buffer->log_filename,
+ logger_buffer->log_filename,
+ ptr_extension);
+ }
+ logger_buffer->compressing = 1;
+ (void) weechat_hook_process ("func:compress",
+ 0,
+ &logger_buffer_compress_cb,
+ logger_buffer,
+ NULL);
+ }
+}
+
+/*
+ * Writes a line to log file.
+ */
+
+void
+logger_buffer_write_line (struct t_logger_buffer *logger_buffer,
+ const char *format, ...)
+{
+ char *charset, *message;
+
+ if (!logger_buffer_create_log_file (logger_buffer))
+ return;
+
+ if (!logger_buffer->log_file)
+ return;
+
+ weechat_va_format (format);
+ if (vbuffer)
+ {
+ charset = weechat_info_get ("charset_terminal", "");
+ message = (charset) ?
+ weechat_iconv_from_internal (charset, vbuffer) : NULL;
+ fprintf (logger_buffer->log_file,
+ "%s\n", (message) ? message : vbuffer);
+ if (charset)
+ free (charset);
+ if (message)
+ free (message);
+ logger_buffer->flush_needed = 1;
+ if (!logger_hook_timer)
+ {
+ fflush (logger_buffer->log_file);
+ if (weechat_config_boolean (logger_config_file_fsync))
+ fsync (fileno (logger_buffer->log_file));
+ logger_buffer->flush_needed = 0;
+ logger_buffer_rotate (logger_buffer);
+ }
+ free (vbuffer);
+ }
+}
+
+/*
+ * Stops log for a logger buffer.
+ */
+
+void
+logger_buffer_stop (struct t_logger_buffer *logger_buffer, int write_info_line)
+{
+ time_t seconds;
+ struct tm *date_tmp;
+ char buf_time[256];
+
+ if (!logger_buffer)
+ return;
+
+ if (logger_buffer->log_enabled && logger_buffer->log_file)
+ {
+ if (write_info_line && weechat_config_boolean (logger_config_file_info_lines))
+ {
+ buf_time[0] = '\0';
+ seconds = time (NULL);
+ date_tmp = localtime (&seconds);
+ 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_buffer_write_line (logger_buffer,
+ _("%s\t**** End of log ****"),
+ buf_time);
+ }
+ }
+
+ logger_buffer_free (logger_buffer);
+}
+
+/*
+ * Ends log for all buffers.
+ */
+
+void
+logger_buffer_stop_all (int write_info_line)
+{
+ while (logger_buffers)
+ {
+ logger_buffer_stop (logger_buffers, write_info_line);
+ }
+}
+
+/*
+ * Starts logging for a buffer.
+ */
+
+void
+logger_buffer_start (struct t_gui_buffer *buffer, int write_info_line)
+{
+ struct t_logger_buffer *ptr_logger_buffer;
+ int log_level, log_enabled;
+
+ if (!buffer)
+ return;
+
+ log_level = logger_get_level_for_buffer (buffer);
+ log_enabled = weechat_config_boolean (logger_config_file_auto_log)
+ && (log_level > 0);
+
+ ptr_logger_buffer = logger_buffer_search_buffer (buffer);
+
+ /* logging is disabled for buffer */
+ if (!log_enabled)
+ {
+ /* stop logger if it is active */
+ if (ptr_logger_buffer)
+ logger_buffer_stop (ptr_logger_buffer, 1);
+ }
+ else
+ {
+ /* logging is enabled for buffer */
+ if (ptr_logger_buffer)
+ ptr_logger_buffer->log_level = log_level;
+ else
+ {
+ ptr_logger_buffer = logger_buffer_add (buffer, log_level);
+
+ if (ptr_logger_buffer)
+ {
+ if (ptr_logger_buffer->log_filename)
+ {
+ if (ptr_logger_buffer->log_file)
+ {
+ fclose (ptr_logger_buffer->log_file);
+ ptr_logger_buffer->log_file = NULL;
+ ptr_logger_buffer->log_file_inode = 0;
+ }
+ }
+ }
+ }
+ if (ptr_logger_buffer)
+ ptr_logger_buffer->write_start_info_line = write_info_line;
+ }
+}
+
+/*
+ * Starts logging for all buffers.
+ */
+
+void
+logger_buffer_start_all (int write_info_line)
+{
+ struct t_infolist *ptr_infolist;
+
+ ptr_infolist = weechat_infolist_get ("buffer", NULL, NULL);
+ if (ptr_infolist)
+ {
+ while (weechat_infolist_next (ptr_infolist))
+ {
+ logger_buffer_start (weechat_infolist_pointer (ptr_infolist,
+ "pointer"),
+ write_info_line);
+ }
+ weechat_infolist_free (ptr_infolist);
+ }
+}
+
+/*
+ * Flushes all log files.
+ */
+
+void
+logger_buffer_flush ()
+{
+ struct t_logger_buffer *ptr_logger_buffer;
+
+ for (ptr_logger_buffer = logger_buffers; ptr_logger_buffer;
+ ptr_logger_buffer = ptr_logger_buffer->next_buffer)
+ {
+ if (ptr_logger_buffer->log_file && ptr_logger_buffer->flush_needed)
+ {
+ if (weechat_logger_plugin->debug >= 2)
+ {
+ weechat_printf_date_tags (NULL, 0, "no_log",
+ "%s: flush file %s",
+ LOGGER_PLUGIN_NAME,
+ 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;
+ logger_buffer_rotate (ptr_logger_buffer);
+ }
+ }
+}
+
+/*
+ * Adjusts log filenames for all buffers.
+ *
+ * Filename can change if configuration option is changed, or if day of system
+ * date has changed.
+ */
+
+void
+logger_buffer_adjust_log_filenames ()
+{
+ struct t_infolist *ptr_infolist;
+ struct t_logger_buffer *ptr_logger_buffer;
+ struct t_gui_buffer *ptr_buffer;
+ char *log_filename;
+
+ ptr_infolist = weechat_infolist_get ("buffer", NULL, NULL);
+ if (ptr_infolist)
+ {
+ while (weechat_infolist_next (ptr_infolist))
+ {
+ ptr_buffer = weechat_infolist_pointer (ptr_infolist, "pointer");
+ ptr_logger_buffer = logger_buffer_search_buffer (ptr_buffer);
+ if (ptr_logger_buffer && ptr_logger_buffer->log_filename)
+ {
+ log_filename = logger_get_filename (ptr_logger_buffer->buffer);
+ if (log_filename)
+ {
+ if (strcmp (log_filename, ptr_logger_buffer->log_filename) != 0)
+ {
+ /*
+ * log filename has changed (probably due to day
+ * change),then we'll use new filename
+ */
+ logger_buffer_stop (ptr_logger_buffer, 1);
+ logger_buffer_start (ptr_buffer, 1);
+ }
+ free (log_filename);
+ }
+ }
+ }
+ weechat_infolist_free (ptr_infolist);
+ }
+}
+
+/*
* Removes a logger buffer from list.
*/
@@ -245,6 +933,8 @@ logger_buffer_add_to_infolist (struct t_infolist *infolist,
return 0;
if (!weechat_infolist_new_var_integer (ptr_item, "flush_needed", logger_buffer->flush_needed))
return 0;
+ if (!weechat_infolist_new_var_integer (ptr_item, "compressing", logger_buffer->compressing))
+ return 0;
return 1;
}
diff --git a/src/plugins/logger/logger-buffer.h b/src/plugins/logger/logger-buffer.h
index 52266fa8d..383de56a8 100644
--- a/src/plugins/logger/logger-buffer.h
+++ b/src/plugins/logger/logger-buffer.h
@@ -21,10 +21,20 @@
#define WEECHAT_PLUGIN_LOGGER_BUFFER_H
#include <stdio.h>
+#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+enum t_logger_buffer_compression
+{
+ LOGGER_BUFFER_COMPRESSION_NONE = 0,
+ LOGGER_BUFFER_COMPRESSION_GZIP,
+ LOGGER_BUFFER_COMPRESSION_ZSTD,
+ /* number of compression types */
+ LOGGER_BUFFER_NUM_COMPRESSION_TYPES,
+};
+
struct t_infolist;
struct t_logger_buffer
@@ -38,6 +48,9 @@ struct t_logger_buffer
int write_start_info_line; /* 1 if start info line must be */
/* written in file */
int flush_needed; /* flush needed? */
+ int compressing; /* compressing rotated log, this */
+ /* prevents any new rotation */
+ /* before the end of compression */
struct t_logger_buffer *prev_buffer; /* link to previous buffer */
struct t_logger_buffer *next_buffer; /* link to next buffer */
};
@@ -50,6 +63,18 @@ extern struct t_logger_buffer *logger_buffer_add (struct t_gui_buffer *buffer,
int log_level);
extern struct t_logger_buffer *logger_buffer_search_buffer (struct t_gui_buffer *buffer);
extern struct t_logger_buffer *logger_buffer_search_log_filename (const char *log_filename);
+extern void logger_buffer_set_log_filename (struct t_logger_buffer *logger_buffer);
+extern int logger_buffer_create_log_file (struct t_logger_buffer *logger_buffer);
+extern void logger_buffer_rotate (struct t_logger_buffer *logger_buffer);
+extern void logger_buffer_write_line (struct t_logger_buffer *logger_buffer,
+ const char *format, ...);
+extern void logger_buffer_stop (struct t_logger_buffer *logger_buffer,
+ int write_info_line);
+extern void logger_buffer_stop_all (int write_info_line);
+extern void logger_buffer_start (struct t_gui_buffer *buffer, int write_info_line);
+extern void logger_buffer_start_all (int write_info_line);
+extern void logger_buffer_flush ();
+extern void logger_buffer_adjust_log_filenames ();
extern void logger_buffer_free (struct t_logger_buffer *logger_buffer);
extern int logger_buffer_add_to_infolist (struct t_infolist *infolist,
struct t_logger_buffer *logger_buffer);
diff --git a/src/plugins/logger/logger-command.c b/src/plugins/logger/logger-command.c
index be81e493b..bb753ed06 100644
--- a/src/plugins/logger/logger-command.c
+++ b/src/plugins/logger/logger-command.c
@@ -143,7 +143,7 @@ logger_command_cb (const void *pointer, void *data,
if (weechat_strcasecmp (argv[1], "flush") == 0)
{
- logger_flush ();
+ logger_buffer_flush ();
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/logger/logger-config.c b/src/plugins/logger/logger-config.c
index b91459346..1fb263a34 100644
--- a/src/plugins/logger/logger-config.c
+++ b/src/plugins/logger/logger-config.c
@@ -20,11 +20,13 @@
*/
#include <stdlib.h>
+#include <string.h>
#include <limits.h>
#include "../weechat-plugin.h"
#include "logger.h"
#include "logger-config.h"
+#include "logger-buffer.h"
struct t_config_file *logger_config_file = NULL;
@@ -56,8 +58,15 @@ struct t_config_option *logger_config_file_nick_prefix;
struct t_config_option *logger_config_file_nick_suffix;
struct t_config_option *logger_config_file_path;
struct t_config_option *logger_config_file_replacement_char;
+struct t_config_option *logger_config_file_rotation_compression_level;
+struct t_config_option *logger_config_file_rotation_compression_type;
+struct t_config_option *logger_config_file_rotation_size_max;
struct t_config_option *logger_config_file_time_format;
+/* other */
+
+unsigned long long logger_config_rotation_size_max = 0;
+
/*
* Callback for changes on option that require a restart of logging for all
@@ -74,7 +83,7 @@ logger_config_change_file_option_restart_log (const void *pointer, void *data,
(void) option;
if (!logger_config_loading)
- logger_adjust_log_filenames ();
+ logger_buffer_adjust_log_filenames ();
}
/*
@@ -148,6 +157,59 @@ logger_config_flush_delay_change (const void *pointer, void *data,
}
/*
+ * Callback called when option "logger.file.rotation_size_max" is changed,
+ * to check if value is valid.
+ *
+ * Returns:
+ * 1: value is OK
+ * 0: value is invalid
+ */
+
+int
+logger_config_rotation_size_max_check (const void *pointer, void *data,
+ struct t_config_option *option,
+ const char *value)
+{
+ unsigned long long size;
+
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) option;
+
+ if (!value || !value[0])
+ return 0;
+
+ if (strcmp (value, "0") == 0)
+ return 1;
+
+ size = weechat_string_parse_size (value);
+
+ return (size > 0) ? 1 : 0;
+}
+
+/*
+ * Callback called when option "logger.file.rotation_size_max" is changed.
+ *
+ * Returns:
+ * 1: value is OK
+ * 0: value is invalid
+ */
+
+void
+logger_config_rotation_size_max_change (const void *pointer, void *data,
+ struct t_config_option *option)
+{
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) option;
+
+ logger_config_rotation_size_max = weechat_string_parse_size (
+ weechat_config_string (logger_config_file_rotation_size_max));
+}
+
+/*
* Callback for changes on a level option.
*/
@@ -161,7 +223,7 @@ logger_config_level_change (const void *pointer, void *data,
(void) option;
if (!logger_config_loading)
- logger_start_buffer_all (1);
+ logger_buffer_start_all (1);
}
/*
@@ -182,7 +244,7 @@ logger_config_level_delete_option (const void *pointer, void *data,
weechat_config_option_free (option);
- logger_start_buffer_all (1);
+ logger_buffer_start_all (1);
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
@@ -243,7 +305,7 @@ logger_config_level_create_option (const void *pointer, void *data,
}
if (!logger_config_loading)
- logger_start_buffer_all (1);
+ logger_buffer_start_all (1);
return rc;
}
@@ -288,7 +350,7 @@ logger_config_mask_change (const void *pointer, void *data,
(void) option;
if (!logger_config_loading)
- logger_adjust_log_filenames ();
+ logger_buffer_adjust_log_filenames ();
}
/*
@@ -309,7 +371,7 @@ logger_config_mask_delete_option (const void *pointer, void *data,
weechat_config_option_free (option);
- logger_adjust_log_filenames ();
+ logger_buffer_adjust_log_filenames ();
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
@@ -370,7 +432,7 @@ logger_config_mask_create_option (const void *pointer, void *data,
}
if (!logger_config_loading)
- logger_adjust_log_filenames ();
+ logger_buffer_adjust_log_filenames ();
return rc;
}
@@ -577,6 +639,45 @@ logger_config_init ()
NULL, NULL, NULL,
&logger_config_change_file_option_restart_log, NULL, NULL,
NULL, NULL, NULL);
+ logger_config_file_rotation_compression_level = weechat_config_new_option (
+ logger_config_file, ptr_section,
+ "rotation_compression_level", "integer",
+ N_("compression level for rotated log files (with extension \".1\", "
+ "\".2\", etc.), if option logger.file.rotation_compression_type is "
+ "enabled: 1 = low compression / fast ... 100 = best compression / "
+ "slow; the value is a percentage converted to 1-9 for gzip and "
+ "1-19 for zstd; the default value is recommended, it offers a good "
+ "compromise between compression and speed"),
+ NULL, 1, 100, "20", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ logger_config_file_rotation_compression_type = weechat_config_new_option (
+ logger_config_file, ptr_section,
+ "rotation_compression_type", "integer",
+ N_("compression type for rotated log files; if set to \"none\", "
+ "rotated log files are not compressed; WARNING: if rotation was "
+ "enabled with another type of compression (or no compression), "
+ "you must first unload the logger plugin, compress files with the "
+ "new type (or decompress files), then change the option in "
+ "logger.conf, then load the logger plugin"),
+ "none|gzip|zstd", 0, 0, "none", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ logger_config_file_rotation_size_max = weechat_config_new_option (
+ logger_config_file, ptr_section,
+ "rotation_size_max", "string",
+ N_("when this size is reached, a rotation of log files is performed: "
+ "the existing rotated log files are renamed (.1 becomes .2, .2 "
+ "becomes .3, etc.) and the current file is renamed with extension "
+ ".1; an integer number with a suffix is allowed: b = bytes "
+ "(default if no unit given), k = kilobytes, m = megabytes, "
+ "g = gigabytes, t = terabytes; example: \"2g\" causes a rotation "
+ "if the file size is > 2,000,000,000 bytes; if set to \"0\", "
+ "no rotation is performed (unlimited log size); WARNING: before "
+ "changing this option, you should first set the compression type "
+ "via option logger.file.rotation_compression_type"),
+ NULL, 0, 0, "0", NULL, 0,
+ &logger_config_rotation_size_max_check, NULL, NULL,
+ &logger_config_rotation_size_max_change, NULL, NULL,
+ NULL, NULL, NULL);
logger_config_file_time_format = weechat_config_new_option (
logger_config_file, ptr_section,
"time_format", "string",
diff --git a/src/plugins/logger/logger-config.h b/src/plugins/logger/logger-config.h
index 46fb55a03..406fc7d87 100644
--- a/src/plugins/logger/logger-config.h
+++ b/src/plugins/logger/logger-config.h
@@ -22,7 +22,6 @@
#define LOGGER_CONFIG_NAME "logger"
-
extern struct t_config_option *logger_config_look_backlog;
extern struct t_config_option *logger_config_look_backlog_conditions;
@@ -40,8 +39,13 @@ extern struct t_config_option *logger_config_file_nick_prefix;
extern struct t_config_option *logger_config_file_nick_suffix;
extern struct t_config_option *logger_config_file_path;
extern struct t_config_option *logger_config_file_replacement_char;
+extern struct t_config_option *logger_config_file_rotation_compression_level;
+extern struct t_config_option *logger_config_file_rotation_compression_type;
+extern struct t_config_option *logger_config_file_rotation_size_max;
extern struct t_config_option *logger_config_file_time_format;
+extern unsigned long long logger_config_rotation_size_max;
+
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);
diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c
index 87a15dd7f..014ada811 100644
--- a/src/plugins/logger/logger.c
+++ b/src/plugins/logger/logger.c
@@ -21,15 +21,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include <errno.h>
#include <stdio.h>
-#include <stdarg.h>
#include <string.h>
#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <fcntl.h>
#include <time.h>
#include "../weechat-plugin.h"
@@ -460,374 +454,6 @@ end:
}
/*
- * Sets log filename for a logger buffer.
- */
-
-void
-logger_set_log_filename (struct t_logger_buffer *logger_buffer)
-{
- char *log_filename, *pos_last_sep;
- char *dir_separator;
- struct t_logger_buffer *ptr_logger_buffer;
-
- /* get log filename for buffer */
- log_filename = logger_get_filename (logger_buffer->buffer);
- if (!log_filename)
- {
- weechat_printf_date_tags (NULL, 0, "no_log",
- _("%s%s: not enough memory"),
- weechat_prefix ("error"),
- LOGGER_PLUGIN_NAME);
- return;
- }
-
- /* log file is already used by another buffer? */
- ptr_logger_buffer = logger_buffer_search_log_filename (log_filename);
- if (ptr_logger_buffer)
- {
- weechat_printf_date_tags (
- NULL, 0, "no_log",
- _("%s%s: unable to start logging for buffer "
- "\"%s\": filename \"%s\" is already used by "
- "another buffer (check your log settings)"),
- weechat_prefix ("error"),
- LOGGER_PLUGIN_NAME,
- weechat_buffer_get_string (logger_buffer->buffer, "name"),
- log_filename);
- free (log_filename);
- return;
- }
-
- /* create directory for path in "log_filename" */
- dir_separator = weechat_info_get ("dir_separator", "");
- if (dir_separator)
- {
- pos_last_sep = strrchr (log_filename, dir_separator[0]);
- if (pos_last_sep)
- {
- pos_last_sep[0] = '\0';
- weechat_mkdir_parents (log_filename, 0700);
- pos_last_sep[0] = dir_separator[0];
- }
- free (dir_separator);
- }
-
- /* set log filename */
- logger_buffer->log_filename = log_filename;
-}
-
-/*
- * Creates a log file.
- *
- * Returns:
- * 1: OK
- * 0: error
- */
-
-int
-logger_create_log_file (struct t_logger_buffer *logger_buffer)
-{
- char *charset, *message, buf_time[256], buf_beginning[1024];
- int log_level, rc;
- time_t seconds;
- struct tm *date_tmp;
- struct stat statbuf;
-
- if (logger_buffer->log_file)
- {
- /*
- * check that the inode has not changed, otherwise that means the file
- * was deleted, and we must reopen it
- */
- rc = stat (logger_buffer->log_filename, &statbuf);
- if ((rc == 0) && (statbuf.st_ino == logger_buffer->log_file_inode))
- {
- /* inode has not changed, we can write in this file */
- return 1;
- }
- fclose (logger_buffer->log_file);
- logger_buffer->log_file = NULL;
- logger_buffer->log_file_inode = 0;
- }
-
- /* get log level */
- log_level = logger_get_level_for_buffer (logger_buffer->buffer);
- if (log_level == 0)
- return 0;
-
- /* create directory */
- if (!logger_create_directory ())
- {
- weechat_printf_date_tags (
- NULL, 0, "no_log",
- _("%s%s: unable to create directory for logs "
- "(\"%s\")"),
- weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
- weechat_config_string (logger_config_file_path));
- return 0;
- }
- if (!logger_buffer->log_filename)
- logger_set_log_filename (logger_buffer);
- if (!logger_buffer->log_filename)
- return 0;
-
- /* create or append to log file */
- logger_buffer->log_file =
- fopen (logger_buffer->log_filename, "a");
- if (!logger_buffer->log_file)
- {
- weechat_printf_date_tags (
- NULL, 0, "no_log",
- _("%s%s: unable to write log file \"%s\": %s"),
- weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
- logger_buffer->log_filename, strerror (errno));
- return 0;
- }
-
- /* get file inode */
- rc = stat (logger_buffer->log_filename, &statbuf);
- if (rc != 0)
- {
- weechat_printf_date_tags (
- NULL, 0, "no_log",
- _("%s%s: unable to get file status of log file \"%s\": %s"),
- weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
- logger_buffer->log_filename, strerror (errno));
- fclose (logger_buffer->log_file);
- logger_buffer->log_file = NULL;
- logger_buffer->log_file_inode = 0;
- return 0;
- }
- logger_buffer->log_file_inode = statbuf.st_ino;
-
- /* write info line */
- if (weechat_config_boolean (logger_config_file_info_lines)
- && logger_buffer->write_start_info_line)
- {
- buf_time[0] = '\0';
- seconds = time (NULL);
- date_tmp = localtime (&seconds);
- 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';
- }
- snprintf (buf_beginning, sizeof (buf_beginning),
- _("%s\t**** Beginning of log ****"),
- buf_time);
- charset = weechat_info_get ("charset_terminal", "");
- message = (charset) ?
- weechat_iconv_from_internal (charset, buf_beginning) : NULL;
- fprintf (logger_buffer->log_file,
- "%s\n", (message) ? message : buf_beginning);
- if (charset)
- free (charset);
- if (message)
- free (message);
- logger_buffer->flush_needed = 1;
- }
- logger_buffer->write_start_info_line = 0;
-
- return 1;
-}
-
-/*
- * Writes a line to log file.
- */
-
-void
-logger_write_line (struct t_logger_buffer *logger_buffer,
- const char *format, ...)
-{
- char *charset, *message;
-
- if (!logger_create_log_file (logger_buffer))
- return;
-
- if (!logger_buffer->log_file)
- return;
-
- weechat_va_format (format);
- if (vbuffer)
- {
- charset = weechat_info_get ("charset_terminal", "");
- message = (charset) ?
- weechat_iconv_from_internal (charset, vbuffer) : NULL;
- fprintf (logger_buffer->log_file,
- "%s\n", (message) ? message : vbuffer);
- if (charset)
- free (charset);
- if (message)
- free (message);
- logger_buffer->flush_needed = 1;
- if (!logger_hook_timer)
- {
- fflush (logger_buffer->log_file);
- if (weechat_config_boolean (logger_config_file_fsync))
- fsync (fileno (logger_buffer->log_file));
- logger_buffer->flush_needed = 0;
- }
- free (vbuffer);
- }
-}
-
-/*
- * Stops log for a logger buffer.
- */
-
-void
-logger_stop (struct t_logger_buffer *logger_buffer, int write_info_line)
-{
- time_t seconds;
- struct tm *date_tmp;
- char buf_time[256];
-
- if (!logger_buffer)
- return;
-
- if (logger_buffer->log_enabled && logger_buffer->log_file)
- {
- if (write_info_line && weechat_config_boolean (logger_config_file_info_lines))
- {
- buf_time[0] = '\0';
- seconds = time (NULL);
- date_tmp = localtime (&seconds);
- 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 (logger_buffer,
- _("%s\t**** End of log ****"),
- buf_time);
- }
- }
-
- logger_buffer_free (logger_buffer);
-}
-
-/*
- * Ends log for all buffers.
- */
-
-void
-logger_stop_all (int write_info_line)
-{
- while (logger_buffers)
- {
- logger_stop (logger_buffers, write_info_line);
- }
-}
-
-/*
- * Starts logging for a buffer.
- */
-
-void
-logger_start_buffer (struct t_gui_buffer *buffer, int write_info_line)
-{
- struct t_logger_buffer *ptr_logger_buffer;
- int log_level, log_enabled;
-
- if (!buffer)
- return;
-
- log_level = logger_get_level_for_buffer (buffer);
- log_enabled = weechat_config_boolean (logger_config_file_auto_log)
- && (log_level > 0);
-
- ptr_logger_buffer = logger_buffer_search_buffer (buffer);
-
- /* logging is disabled for buffer */
- if (!log_enabled)
- {
- /* stop logger if it is active */
- if (ptr_logger_buffer)
- logger_stop (ptr_logger_buffer, 1);
- }
- else
- {
- /* logging is enabled for buffer */
- if (ptr_logger_buffer)
- ptr_logger_buffer->log_level = log_level;
- else
- {
- ptr_logger_buffer = logger_buffer_add (buffer, log_level);
-
- if (ptr_logger_buffer)
- {
- if (ptr_logger_buffer->log_filename)
- {
- if (ptr_logger_buffer->log_file)
- {
- fclose (ptr_logger_buffer->log_file);
- ptr_logger_buffer->log_file = NULL;
- ptr_logger_buffer->log_file_inode = 0;
- }
- }
- }
- }
- if (ptr_logger_buffer)
- ptr_logger_buffer->write_start_info_line = write_info_line;
- }
-}
-
-/*
- * Starts logging for all buffers.
- */
-
-void
-logger_start_buffer_all (int write_info_line)
-{
- struct t_infolist *ptr_infolist;
-
- ptr_infolist = weechat_infolist_get ("buffer", NULL, NULL);
- if (ptr_infolist)
- {
- while (weechat_infolist_next (ptr_infolist))
- {
- logger_start_buffer (weechat_infolist_pointer (ptr_infolist,
- "pointer"),
- write_info_line);
- }
- weechat_infolist_free (ptr_infolist);
- }
-}
-
-/*
- * Flushes all log files.
- */
-
-void
-logger_flush ()
-{
- struct t_logger_buffer *ptr_logger_buffer;
-
- for (ptr_logger_buffer = logger_buffers; ptr_logger_buffer;
- ptr_logger_buffer = ptr_logger_buffer->next_buffer)
- {
- if (ptr_logger_buffer->log_file && ptr_logger_buffer->flush_needed)
- {
- if (weechat_logger_plugin->debug >= 2)
- {
- weechat_printf_date_tags (NULL, 0, "no_log",
- "%s: flush file %s",
- LOGGER_PLUGIN_NAME,
- 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;
- }
- }
-}
-
-/*
* Callback for signal "buffer_opened".
*/
@@ -842,7 +468,7 @@ logger_buffer_opened_signal_cb (const void *pointer, void *data,
(void) signal;
(void) type_data;
- logger_start_buffer (signal_data, 1);
+ logger_buffer_start (signal_data, 1);
return WEECHAT_RC_OK;
}
@@ -862,7 +488,7 @@ logger_buffer_closing_signal_cb (const void *pointer, void *data,
(void) signal;
(void) type_data;
- logger_stop (logger_buffer_search_buffer (signal_data), 1);
+ logger_buffer_stop (logger_buffer_search_buffer (signal_data), 1);
return WEECHAT_RC_OK;
}
@@ -882,8 +508,8 @@ logger_buffer_renamed_signal_cb (const void *pointer, void *data,
(void) signal;
(void) type_data;
- logger_stop (logger_buffer_search_buffer (signal_data), 1);
- logger_start_buffer (signal_data, 1);
+ logger_buffer_stop (logger_buffer_search_buffer (signal_data), 1);
+ logger_buffer_start (signal_data, 1);
return WEECHAT_RC_OK;
}
@@ -903,7 +529,7 @@ logger_start_signal_cb (const void *pointer, void *data,
(void) signal;
(void) type_data;
- logger_start_buffer (signal_data, 1);
+ logger_buffer_start (signal_data, 1);
return WEECHAT_RC_OK;
}
@@ -927,56 +553,12 @@ logger_stop_signal_cb (const void *pointer, void *data,
ptr_logger_buffer = logger_buffer_search_buffer (signal_data);
if (ptr_logger_buffer)
- logger_stop (ptr_logger_buffer, 0);
+ logger_buffer_stop (ptr_logger_buffer, 0);
return WEECHAT_RC_OK;
}
/*
- * Adjusts log filenames for all buffers.
- *
- * Filename can change if configuration option is changed, or if day of system
- * date has changed.
- */
-
-void
-logger_adjust_log_filenames ()
-{
- struct t_infolist *ptr_infolist;
- struct t_logger_buffer *ptr_logger_buffer;
- struct t_gui_buffer *ptr_buffer;
- char *log_filename;
-
- ptr_infolist = weechat_infolist_get ("buffer", NULL, NULL);
- if (ptr_infolist)
- {
- while (weechat_infolist_next (ptr_infolist))
- {
- ptr_buffer = weechat_infolist_pointer (ptr_infolist, "pointer");
- ptr_logger_buffer = logger_buffer_search_buffer (ptr_buffer);
- if (ptr_logger_buffer && ptr_logger_buffer->log_filename)
- {
- log_filename = logger_get_filename (ptr_logger_buffer->buffer);
- if (log_filename)
- {
- if (strcmp (log_filename, ptr_logger_buffer->log_filename) != 0)
- {
- /*
- * log filename has changed (probably due to day
- * change),then we'll use new filename
- */
- logger_stop (ptr_logger_buffer, 1);
- logger_start_buffer (ptr_buffer, 1);
- }
- free (log_filename);
- }
- }
- }
- weechat_infolist_free (ptr_infolist);
- }
-}
-
-/*
* Callback for signal "day_changed".
*/
@@ -992,7 +574,7 @@ logger_day_changed_signal_cb (const void *pointer, void *data,
(void) type_data;
(void) signal_data;
- logger_adjust_log_filenames ();
+ logger_buffer_adjust_log_filenames ();
return WEECHAT_RC_OK;
}
@@ -1107,7 +689,7 @@ logger_print_cb (const void *pointer, void *data,
buf_time[0] = '\0';
}
- logger_write_line (
+ logger_buffer_write_line (
ptr_logger_buffer,
"%s\t%s%s%s\t%s%s",
buf_time,
@@ -1138,7 +720,7 @@ logger_timer_cb (const void *pointer, void *data, int remaining_calls)
(void) data;
(void) remaining_calls;
- logger_flush ();
+ logger_buffer_flush ();
return WEECHAT_RC_OK;
}
@@ -1163,7 +745,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
logger_command_init ();
- logger_start_buffer_all (1);
+ logger_buffer_start_all (1);
weechat_hook_signal ("buffer_opened",
&logger_buffer_opened_signal_cb, NULL, NULL);
@@ -1211,7 +793,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
logger_config_write ();
- logger_stop_all (1);
+ logger_buffer_stop_all (1);
logger_config_free ();
diff --git a/src/plugins/logger/logger.h b/src/plugins/logger/logger.h
index 3a79590e4..364f5c163 100644
--- a/src/plugins/logger/logger.h
+++ b/src/plugins/logger/logger.h
@@ -33,12 +33,10 @@ extern struct t_weechat_plugin *weechat_logger_plugin;
extern struct t_hook *logger_hook_timer;
extern struct t_hook *logger_hook_print;
+extern int logger_create_directory ();
extern char *logger_build_option_name (struct t_gui_buffer *buffer);
-extern void logger_set_log_filename (struct t_logger_buffer *logger_buffer);
-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_get_level_for_buffer (struct t_gui_buffer *buffer);
+extern char *logger_get_filename (struct t_gui_buffer *buffer);
extern int logger_print_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer, time_t date,
int tags_count, const char **tags,