Solved

logging on ejb/jsp/servlet application

Posted on 2002-05-15
3
164 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video teaches viewers about errors in exception handling.
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 …

762 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

6 Experts available now in Live!

Get 1:1 Help Now