hello guys welcome to this lecture so today we will see how to configure log4j the core components to configure log4j are discussed here so configuring log4j involves assigning the level defining appenders and also specifying the layout objects in the configuration file the log4j dot properties file is a log4j configuration file which keeps properties in key value pairs so always remember when you are writing the properties file you have to follow the naming convention as log4j door properties because log4j always looks for that properties in order to you know embed all the configurations which are which you have written there so as as all other properties property files which which we write this is also exactly similar to that of other property files because you know it also holds the key value pairs and then you can write a key value key followed by a value okay by default the log manager looks for the file name locks log4j door properties in the class path so always you have to keep this property file in the class path the log4j properties syntax is something like first we have to define the root logger along with the appenders which we’ll be using in the properties file so you could go like log4j dot root log equals you would write what is the level which you want to set and also what are the offenders you will be using in the properties file the next you would write the offenders you would define the offenders as in what what type of offender it is and what is the layout for that offender and what is the conversion pattern like as and how you want to display it and so on and so forth so this is the basic syntax as in first first we have to write about the root logger telling it what will be by the word will be the level of the logging and also what are the offenders will be using and then next you will be defining the offenders individually we will look at the example program wherein we will give we will see how to use the console appender and so on and then there I would be I would be explaining you the patterns as well the layouts how we are using their


Google Plus

Apache Zookeeper Tutorial

Apache Kafka Tutorial

Apache Kafka Security

Elasticserarch n Kibana

Java 8 Tutorial

Log4J Tutorial

Apache Storm Tutorial

SQLite Tutorial

Apache Ant Tutorial

Related Posts


Apache Kafka Commands Cheat sheet

Spread the loveKafka Topics List existing topics bin/kafka-topics.sh –zookeeper localhost:2181 –list Purge a topic bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –config retention.ms=1000 … wait a minute … bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –delete-config retention.ms
Read more…


What is Apache Maven | Apache Maven complete tutorial from scratch pdf

Spread the love In this post you will learn the complete tutorial of Apache Maven build tool What is Maven ? Apache Maven is a software project management and comprehension tool. Based on the concept
Read more…


Practical Guide for Web Development in 2018

Spread the loveWelcome to my practical guide  for web development in 2018 in terms of  technology and career. Before we start I just want to  mention a few things, you don’t need to learn  everything that
Read more…