Skip to main content

Home/ Java Development/ Group items tagged log4j

Rss Feed Group items tagged

Hendy Irawan

SLF4J - 0 views

  •  
    The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time. Before you start using SLF4J, we highly recommend that you read the two-page SLF4J user manual. In case you wish to migrate your Java source files to SLF4J, consider our migrator tool which can migrate your project into SLF4J in minutes. In case an externally-maintained component you depend on uses a logging API other than SLF4J, such as commons logging, log4j or j.u.l, have a look at SLF4J's binary-support for legacy APIs.
Miguel Guerra Connor

Log4j Tutorial : How to send log messages to different log files? | Veera Sundar - 0 views

  •  
    multiples archivos log en log4j
Rinav G

[JavaSpecialists 177] - Logging Part 3 of 3 - 0 views

  • Writing your own logging framework is the perfect coding crime.
  • Writing your own logging framework is the perfect coding crime
  • Even the Sun engineers fell into this trap. Prior to Java 4, we had a perfectly good logging framework in Log4J. However, instead of adopting this into the standard Java distribution, we ended up with java.util.logging. There are lots of Java logging frameworks available, even meta-logging frameworks like SLF4J and Jakarta Commons. These are supposed to abstract the logging frameworks so you can change the implementation without touching your code.
  • ...5 more annotations...
  • Logging Levels
  • In Log4J for example, we have six default levels, FATAL, ERROR, WARNING, INFO, DEBUG and TRACE.
  • Since it is tricky assigning the correct levels in our code, we should regularly do code reviews with specific emphasis on logging levels.
  • We should be able to adjust the log levels of our individual components at runtime without restarting our application.
  • Silent Operation
  •  
    Writing your own logging framework is the perfect coding crime. If you can convince your manager to put it on the project plan, you are guaranteed to have success. At the end of each day, you will go home feeling happy and satisfied. It will feel like you are doing something creative. You will get the intellectual stimulation without the risk of failure. Even the Sun engineers fell into this trap. Prior to Java 4, we had a perfectly good logging framework in Log4J. However, instead of adopting this into the standard Java distribution, we ended up with java.util.logging. There are lots of Java logging frameworks available, even meta-logging frameworks like SLF4J and Jakarta Commons. These are supposed to abstract the logging frameworks so you can change the implementation without touching your code. http://www.javaspecialists.eu/archive/Issue177.html
abuwipp

Don't Use System.out.println! - 0 views

  •  
    good tutorial showing how to log using log4j, contains  many examples
Mahmoud Rabie

Using AspectJ to log all methods parameters and return values during application runtime - 8 views

  •  
    AspectJ is an aspect-oriented extension created at PARC for the Java programming language. It is available in Eclipse Foundation open-source projects, both stand-alone and integrated into Eclipse. AspectJ has become the widely used de-facto standard for AOP by emphasizing simplicity and usability for end users. It uses Java-like syntax and has included IDE integrations for displaying crosscutting structure since its initial public release in 2001. In this article we will describe how we can use AspectJ to do the logging job for all methods parameters and methods return values in a Java application
1 - 7 of 7
Showing 20 items per page