Log4j2 compatibility

Abierto
#2 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
clojure, java
Área
backend

Línea de trabajo

No se nombra ningún archivo fuente ni ninguna prueba. Empieza leyendo la discusión del pull request enlazado y las implementaciones existentes de Logback y Java Util Logging; después, investiga el comportamiento de recarga de la configuración de Log4j2. Se considera terminado cuando la compatibilidad con Log4j2 funciona de forma fiable sin que se pierdan los cambios de configuración, usando un enfoque dinámico o uno configurado explícitamente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Clojure
Estrellas
2
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de clojure-emacs/logjam

Todos los issues de clojure-emacs/logjam

Issues similares

Más issues de Clojure

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.