log4j:ERROR Could not find value for key log4j.appender.error

我是在rootLogger末尾加入R就好了。

最终我的配置环境如下:

#设置日志的级别 ,多个以,分开(没有给出的,则不会被输出)
log4j.rootLogger=info,error,R

#DailyRollingFileAppender每天产生一个日志文件
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender

#设置日志文件保存路径
log4j.appender.R.File=logs/backup.log

#日志输出格式
log4j.appender.R.layout.ConversionPattern=%-d{yyyy-MM-dd HH\:mm\:ss} [%c]-[%p] %m%n

#设置日志文件后缀名,决定着多长时间创建一个新的文件!yyyyMMdd每天一个,yyyyMMddHH第小时一个,...
log4j.appender.R.DatePattern='.'yyyy-MM-dd

#日志布局格式
log4j.appender.R.layout=org.apache.log4j.PatternLayout

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-11-05 13:38:33

log4j:ERROR Could not find value for key log4j.appender.error的相关文章

Laravel 5.4 migrate报错:Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `us ers_email_unique`(`email`))

Laravel 5.4 migrate报错:Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `us     ers_email_unique`(`email`)) public function up() { Schema::create('users', function (Blu

MySQL主从复制中断,报“Error on master: message (format)='Cannot delete or update a parent row: a foreign key constraint fails' error code=1217” 错误

前几天,发现从库挂了,具体报错信息如下: 分析思路 1. 因为我采用的是选择性复制,只针对以下几个库进行复制: card,upay,deal,monitor,collect.所以,不太可能出现对于sas_basic的操作能复制到该从库上. 2. 整个架构是1主2从,且都是选择性复制,上面这个从库是直接复制card,upay,deal,monitor,collect这几个数据库的数据,而另外一个从库则是忽略上述库,如下所示: 怀疑是在上述schema下,执行了DROP TABLE IF EXIST

Crystal Report Error: Either the Crystal Reports registy key permission are insufficient or the Crystal Reports runtime is not installed correctly

在64位 Windows 7中水晶报表的错误: Crystal Report Error: Either the Crystal Reports registy key permission are insufficient or the Crystal Reports runtime is not installed correctly Solution: Crystal Reports does not initialize with x64 configuration. Changed t

mysql执行带外键的sql文件时出现mysql ERROR 1215 (HY000): Cannot add foreign key constraint的解决

ERROR 1215 (HY000): Cannot add foreign key constraint 最近在建表时遇到了这个错误,然后找了下找到了解决办法,记录下: 本来是要建两张表: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 create table department( id int, name varchar(20) ); create table employee( id int primary key auto_increment, name varch

ERROR 1062 (23000): Duplicate entry for key 'PRIMARY'

ALTER TABLE table1 ADD COLUMN column1 VARCHAR(400) DEFAULT NULL; ERROR 1062 (23000): Duplicate entry '82133627' for key 'PRIMARY' select * from table1 where <primary_key_field>='82133627'; Primary key - primary_key_field int(11) NOT NULL solution -

laravel migrate时报错:Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

在按照文档执行php artisan migrate时报错. SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) 解决方法 namespace App\Providers; use Illum

php artisan migrate时出现 SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes解决办法

在测试队列中运用artisan命令行 php artisan queue:table php artisan migrate时出现 SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes Change database.php which is in config folder where it says 'charset' =

kafka producer生产数据到kafka异常:Got error produce response with correlation id 16 on topic-partition...Error: NETWORK_EXCEPTION

kafka producer生产数据到kafka异常:Got error produce response with correlation id 16 on topic-partition...Error: NETWORK_EXCEPTION 1.问题描述 2017-09-13 15:11:30.656 o.a.k.c.p.i.Sender [WARN] Got error produce response with correlation id 25 on topic-partition t

error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

Windows服务器Azure云编译安装MariaDB教程 www.111cn.net 编辑:future 来源:转载 安装MariaDB数据库最多用于linux系统中了,下文给各位介绍在Windows服务器Azure云编译安装MariaDB教程,希望本文能帮助到各位. 试用1元Windows Azure,带宽都是杠杠的.下面演示下Windows Azure下编译安装LNMP环境,系统环境是Ubuntu 14.04 TLS版 软件版本: 数据库:mariadb-10.0.13 Stable PH