Development #47708
désactiver le logging sentry dans runscript
Début:
15 octobre 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Je viens de passer sur une vingtaine de traces venant de là, plutôt qu'avoir les essais/erreurs arriver dans sentry, désactiver ce logging.
(éventuellement uniquement s'il y a une tty, pour que ça reste opérant sur du runscript pérenne tapé dans un cron).
Fichiers
Demandes liées
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 3 ans
- Fichier 0001-misc-disable-sentry-in-runscript-on-a-tty-47708.patch 0001-misc-disable-sentry-in-runscript-on-a-tty-47708.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Testé sur combo.node1.test.saas.entrouvert.org, ça marche.
Mis à jour par Benjamin Dauvergne il y a plus de 3 ans
Mais un simple | less
rendra ça ineffectif.
Mis à jour par Benjamin Dauvergne il y a plus de 3 ans
- Fichier 0001-misc-disable-logging-in-runscript-and-shell-when-in-.patch 0001-misc-disable-logging-in-runscript-and-shell-when-in-.patch ajouté
Il me semble que détecter un context shell/terminal via TERM est plus sûr que via fd.isatty()
, proposition qui intègre ça à shell et runscript et qui désactive aussi syslog, journald et les mails aux administrateurs.
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Benjamin Dauvergne il y a plus de 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 59d13b7300341f6e30c76f439079db065e76578a Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Thu Oct 15 10:30:20 2020 +0200 misc: disable logging in runscript and shell when in command shell (#47708) Command shell context is guessed by the presence of the TERM environment variable (should not happen when launched by crond, initd or systemd).
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Frédéric Péters il y a environ 2 ans
- Dupliqué par Support #42197: désactiver sentry pour les commandes shell/runscript (?) ajouté
misc: disable logging in runscript and shell when in command shell (#47708)
Command shell context is guessed by the presence of the TERM environment
variable (should not happen when launched by crond, initd or systemd).