Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

logging on ejb/jsp/servlet application

Posted on 2002-05-15
3
Medium Priority
?
173 Views
Last Modified: 2013-11-24
I was wondering if logging to a file on this type of application is ok.  Would it be better to log on a database instead especially if it holds personal data of the customer.

Thanks
0
Comment
Question by:borg48
  • 2
3 Comments
 
LVL 1

Expert Comment

by:mraible
ID: 7015411
I'd recommend using Log4j from jakarta.apache.org - you can do JDBC or file logging.  Logging to a file or a database is up to you - since they'll both (most likely) be on the same server as your app server, it depends on how you want to protect the different logging stores.  With a file, you can protect with file permissions, with a database, you can use database access permissions.
0
 

Author Comment

by:borg48
ID: 7022273
Is there a benefit from logging to a database ver file.  Performance for example?

Thanks
0
 
LVL 1

Accepted Solution

by:
mraible earned 200 total points
ID: 7022303
File pros:
-- faster performance
-- easy configuration/setup

File cons:
-- security not as robust (file permissions)
-- difficult to keep and maintain historic log

DB pros:
-- security (built-in database security)
-- easy to create reports from log tables

DB cons:
-- more difficult to setup
-- probably slower than file logging

You might alleviate performance issues is you use a MySQL database for logging.  It's VERY fast - no referential integrity though.  You may not need RI if you're just using it for logging though.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

877 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