Solved

logging on ejb/jsp/servlet application

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
javap bin 2 40
eclipse console opening separately 2 29
maven disable workspace resolution 1 16
java mysql insert application 14 25
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…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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 …

809 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