当前位置:网站首页>Solve the problem that the MapReduce program console does not have log information warn please initialize the log4j system properly
Solve the problem that the MapReduce program console does not have log information warn please initialize the log4j system properly
2022-06-24 18:37:00 【Prosperity is like love】
function mapreduce When , No log file found , A warning will be given :
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

It is found that the console has not been output again mapreduce Task information of . Later, it was found that the configuration is required log4j.
stay resource Create one in the directory log4j.properties file 
Add the following information :
log4j.rootLogger=info, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=D:/test/logs.txt
log4j.appender.File.DatePattern='_'yyyy-MM-dd'.txt'
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d %t %-5p [%c] %m%n

边栏推荐
- Flutter dart regular regexp matches non printing characters \cl\cj\cm\ck
- The mixed calculation of rpx and PX in JS by the uniapp applet
- Get the actual name of the method parameter through the parameter
- Creating a new MySQL user in Amazon RDS environment - creating a new MySQL user in Amazon RDS environment
- 云服务器类型怎么选,要考虑什么?
- 面试算法 - 字符串问题总结
- Sword finger offer 10- ii Frog jumping on steps
- C language - structure II
- What is business intelligence (BI)?
- Implementation of pure three-layer container network based on BGP
猜你喜欢

The country has made a move! Launch network security review on HowNet

Overall planning and construction method of digital transformation
![[NLP] 3 papers on how Stanford team builds a better chat AI](/img/f1/1c2ff31a728152395618800600df45.jpg)
[NLP] 3 papers on how Stanford team builds a better chat AI

110. balanced binary tree

Two micro service interviews where small companies suffer losses

Ten excellent business process automation tools for small businesses

Crmeb multi merchant PC packaging tutorial

How can an enterprise successfully complete cloud migration?

Huitongda officially landed at the Hong Kong Stock Exchange: the gross profit margin continued to decline, and the book value of several shareholders still suffered losses

微服务系统设计——子服务项目构建
随机推荐
The country has made a move! Launch network security review on HowNet
Application service access configuration parameters
congratulate! The first dragon lizard community annual outstanding contribution award is announced. Check it now
Network security database penetration of secondary vocational group in 2022
What is business intelligence (BI)?
[NLP] 3 papers on how Stanford team builds a better chat AI
Introduction to yottastore, a new generation of storage engine for VPC TCE cos
110. balanced binary tree
Navigator object
Get the actual name of the method parameter through the parameter
Sudoku (easy to understand)
Leetcode question 136 [single number]
2022 network security C module of the secondary vocational group scans the script of the surviving target aircraft (municipal, provincial and national)
Usage of typedef enum (enumeration)
国家出手了!对知网启动网络安全审查
Business based precipitation component = & gt; manage-table
Five skills of selecting embedded programming language
Selection (031) -cool_ How long can secret be accessed?
Project Management Guide: tips, strategies and specific practices
13 ways to reduce the cost of cloud computing