hello guys today we are going to start log4j tutorials log4j is a logging framework which is known to be reliable fast and flexible log4j is written in Java and it was distributed under the Apache Software license so before going into this logging framework we have to know what is a necessity to have a logging framework so as we know in the development environment when we write a code we usually use system dot out dot println to print the logs or whatever the flow of the program onto the console and also if we take in the development environment we could use debugging tool whenever something goes wrong and we have to sit and sort out or we have to narrow down what has went wrong to in order to debug the program these two are the possibilities where we have been using you know to write the logs or to debug to sit back and debug what has went wrong in order to know what IO what’s going on in the program so the emergence of logging framework was for many reasons system dot out dot println is only used for console display and also if you observe the system dot out dot println it’s a synchronized method so it is very costly so every time you write for system dot out dot println like hundred times in a in a program it is it’s just not an efficient way to program because you are using a synchronized method there so this is one of the drawback of system roller dot println and also you can only display the information on the console so what if you need to write the data onto file and use it later on or you know you have to send that file over to someone so that they could have a look at what has happened and they could they could do the debugging and what if you want to work with multiple files at the same time and also not only write the data on to the console but also to the file but debugging could be used but it helps only in the development environment and not in the production environment and also if you are going to debug a remote application you cannot use a debugging so because the bagging is not possible in remote application so logging tool has to be used in all of these cases so when we are considering all of the above cases which I mentioned like if you want to write a date on not only on to the console but also on the file and if you want to work with multiple files at the same time and also all of these are addressed by using a login framework which is log forging in order to track the application flow you would need a logging framework and also you need the logging to keep as a record at you as what has happened how the flow takes place so we will see what are the various aspects of this log for GT log4j tool one by one in the coming lectures

Tags:






Youtube
Facebook
Google Plus
Twitter
TutorialDrive


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

blog

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…

blog

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…

blog

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…