Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

LogFactory and Log

Posted on 2006-06-15
3
Medium Priority
?
263 Views
Last Modified: 2008-02-26
First off, let me state I'm not a Java programmer.  I'm integrating some ASP .NET code with a Java Web App.  

My question is about the following line:

private static Log log  = LogFactory.getLog (myclass.class);

and then they use log.error(e) or log.debug....etc.

My question is, is this creating an actual log file somewhere on the system?  I want to be able to check it for errors if indeed that's what it's for.

Thanks.
0
Comment
Question by:moonshot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 16916638
the definition of the actually logger that will be written to will be in yourt loggoing config file, it may be going to a log file or it may not.
0
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 1500 total points
ID: 16917308
There /probably/ is a log file. That is the most common logging destination although Java logging systems can also log to a variety of other destinations. Since your example was with LogFactory, my suspicion is that the web app uses the jakarta commons-logging api (http://jakarta.apache.org/commons/logging/guide.html). This is a wrapper api that abstracts other logging subsystems. It doesn't actually do the logging itself. It delegates that activity to another logging package. It primarily came about because for quite some time the standard Java runtime class libraries did not include a specific logging api and various alternatives were advanced. As of JDK 1.4, there is the java.util.logging package (http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/). Another very popular logging api is log4j (http://logging.apache.org/log4j/docs/).

If you look at the commons-logging guide, it has a section on configuration. This section will help you to understand how commons-logging discovers the logging api that it will wrap. You can go through the same process to figure out which logging package is actually being used. The other links will help you in understanding the configuration of log4j and java.util.logging and, assuming that the logging destination is actually a file, what that file is named and where it may be found.

Regards,
Jim Cakalic
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16920259
Yes, the log-file has to be defined somewhere - check your configuration and properties-files.
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question