Comments (1)
-
业务系统还可以继续使用 log4j 去打印日志,不过由于引入你的依赖,并使用 logback 打印。如果一定要达到这个目的的话,就需要业务系统同时引入 logback 和 log4j 的日志实现。另,一般我们的实践经验是,业务系统用了哪个日志实现,你的这个依赖就用 log4j 去打,没必要强制用户还要引入 logback 的依赖,虽然可以做到。因为应用是业务系统的,其他的依赖包应该由业务系统决定日志实现,强制它可能接入成本高些。
-
我们是实践是,大家统一起来,不应该去面向日志实现编程,而应该通过 sofa-commmon-tools 都面向日志编程接口 slf4j 去编程,需要推动改进。
-
场景:主要是基础 jar 提供给别人用,要打印日志,如果自己强依赖了日志实现,就要被接入方必须引入相应的日志实现,通过此 sofa-common-tools 保证基础 jar 提供方不去强制绑定一个日志实现,有业务选择实现,我们的基础jar 均能通过其完成日志打印,接入成本和使用成本被变得更低。
-
这个能力,可以通过 API 动态的设置日志级别完成切换,而不需要重启,当然调用方需要有不同的触发条件触发;之后我们会慢慢开放动态配置中间件,配合起来效果会更好。现在是 API 层面提供了这个能力。关键词:不要重启来动态调整日志级别。
from sofa-common-tools.
Related Issues (20)
- 支持单独配置终端日志级别 HOT 4
- LogEnvUtils will cause java.util.ConcurrentModificationException
- DefaultConfigManger will cause concurrent problem
- Better logger name where there are no known logging backend provided
- Add Public Access Modifiers to ExecutingRunnable
- Local console logger support prefix match
- Why logger init logs only printed on debug level?
- LoggerSpaceFactory4LogbackBuilder#doBuild should use spaceClassloader load LogbackLoggerSpaceFactory class HOT 1
- MutiAppLoggerSpaceManager should use caller classloader default
- Tools itself logging problem HOT 1
- Support for JDK/Spring ThreadPoolExecutor logging of decayed tasks HOT 1
- getCallerClassLoader gets wrong classloader
- bug in SofaThreadPoolTaskExecutor threadPoolName setter
- XML configuration file are very redunant
- Using of SimpleDateFormat in multi-thread environment is unsafe
- Terminate the support of JDK 6
- Not support print stack when executing one runnable in different thread
- 对于三方包, 如何重定向二方包的日志输出? HOT 1
- Use dependencyManagement and properties to manage all dependencies
- Refactor the thread pool module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sofa-common-tools.