Solved

logging on ejb/jsp/servlet application

Posted on 2002-05-15
3
165 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 103
bitbucket vs gitbucket 3 58
eclipse argument 14 53
Java SE 8u111  Lot of stuff broke 11 54
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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…

864 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now