log4j:WARN No appenders could be found for logger

运行java类的时候提示错误

错误信息:

log4j:WARN No appenders could be found for logger

。。。。。。

log4j:WARN Please initialize the log4j system properly.

分析:看提示是log4j配置的问题

解决问题: 排除了 logj.properties配置 正确后, 再确认 配置文件编码和 调用文件编码是否一致,果然。发现调用的bat文件 编码是ANSI, 而log4j.peoperties被改为utf-8编码了。

解决方式:将log4j.peoperties用editplus打开,另存为ANSI编码即可。

相关推荐
SoleMotive.20 小时前
redis实现漏桶算法--https://blog.csdn.net/m0_74908430/article/details/155076710
redis·算法·junit
百花~1 天前
自动化测试概念篇~
selenium·log4j
虹科网络安全2 天前
艾体宝干货 | Redis Python 开发系列#4 保证原子性与性能
redis·python·junit
我发在否2 天前
OpenResty > 平滑升级:1.25.x → 1.27.x
junit·openresty
IMPYLH2 天前
Lua 的 pairs 函数
开发语言·笔记·后端·junit·单元测试·lua
安冬的码畜日常2 天前
【JUnit实战3_35】第二十二章:用 JUnit 5 实现测试金字塔策略
测试工具·junit·单元测试·集成测试·系统测试·bdd·测试金字塔
k***3883 天前
SpringBoot Test详解
spring boot·后端·log4j
马达加斯加D4 天前
C# --- 如何写UT
前端·c#·log4j
秃了也弱了。4 天前
testng:Java界功能强大的单元测试框架
java·单元测试·log4j
IMPYLH6 天前
Lua 的 collectgarbage 函数
开发语言·笔记·junit·单元测试·lua