Log4j2 compatibility

未关闭
#2 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
clojure, java
领域
backend

调研方向

未指定源文件或测试。首先阅读所链接 pull request 的讨论以及现有的 Logback 和 Java Util Logging 实现,然后调查 Log4j2 的配置重新加载行为。当 Log4j2 支持能够可靠运行且不会丢失配置更改,并采用动态方式或显式配置的方式之一时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Clojure
星标
2
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

clojure-emacs/logjam 的其他 Issue

查看 clojure-emacs/logjam 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。