Log4j2 compatibility

Ouverte
#2 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
À l'abandon
Stack technique
clojure, java
Domaine
backend

Piste de recherche

Aucun fichier source ni test n’est indiqué. Commencez par lire la discussion du pull request associé et les implémentations existantes de Logback et Java Util Logging, puis étudiez le comportement de rechargement de la configuration de Log4j2. La tâche est terminée lorsque la prise en charge de Log4j2 fonctionne de manière fiable sans que les modifications de configuration soient écrasées, en utilisant soit une approche dynamique, soit une approche configurée explicitement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Context

https://github.com/clojure-emacs/cider-nrepl/pull/773#discussion_r1226611259

Brief

Right now this works with Logback (which I am using) and Java Util Logging. There is some code for Log4j2 that passes some of the tests, but I couldn't make it working reliably. The issue seems that Log4j2 reloads its configuration when a new appender is added, and wipes out the changes. I tried most of the suggestions on Stackoverflow to get it working, but I'm giving up on this one. I already spent too much time on this. So, I propose to drop that code into a branch of the separated library. If anyone knows how to get it working, I'm willing to help, but I won't investigate this beast any further.

Possible solutions

  • Persevere through the original approach
  • Try a less dynamic approach:

Would it help if the nrepl logger wasn't dynamically added?
e.g. one could configure it such that it's instantiated as the JVM starts.
This would probably involve a .xml file or a user.clj file.
...this would not invalidate the current, dynamic approach, I'd see it instead of an additional, opt-in manner to run things.

It might, but I believe for this to work we would need to use gen-class to create an appender class that implements some Log4j2 interface and ship it, so that it can be referenced in the configuration file.
And then somehow connect this with the atom to which events are added.

Langage dominant
Clojure
Étoiles
2
Forks
1
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de clojure-emacs/logjam

Toutes les issues de clojure-emacs/logjam

Issues similaires

Plus d'issues Clojure

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.