Log4j2 compatibility

Aperta
#2 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
clojure, java
Ambito
backend

Direzione di ricerca

Non è indicato alcun file sorgente né alcun test. Inizia leggendo la discussione del pull request collegato e le implementazioni esistenti di Logback e Java Util Logging, quindi analizza il comportamento del ricaricamento della configurazione di Log4j2. Il lavoro è completato quando il supporto per Log4j2 funziona in modo affidabile senza che le modifiche alla configurazione vengano sovrascritte, utilizzando un approccio dinamico oppure configurato esplicitamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Clojure
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di clojure-emacs/logjam

Tutte le issue di clojure-emacs/logjam

Issue simili

Altre issue su Clojure

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.