• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Logging suggestion

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I am asking this again since I did not get a response the last time. So please if you can suggest/respond to this I will greately appreciate it.

Basically, I am using jakarta struts to develop a small project. I am trying to see how I can log the activities of all users who log in to the application and access the database (creating, deleting and editing data) etc. I want to be able to record these information so that I know who logged in when, what the activity of that user was. Now, I have and am still reading on some mechanisms such as the log4j etc. But I am still not sure of what tool to use to accomplish this.
If I am to use the log4j do I use the logger.info for inserting such info or what? Can any one suggest to me what tool to use so that I start reading and working on it. Also if anyone know where I can get more resources regarding this (such as examples) can you please tell me.
Thank you in advance for your help.
Lee
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
log4j will generate text/log files that you will have to use some sort of utilities to parse out the information you are after per user. there may be utilities out there that may allow you to set up log4j in a certain structure that allows for easy reporting.

if you want to audit user activities and write useful reports easier, i'd go with a simple database table. it seems you already have the user login information, all you do is have an common method to insert a line into something like a USER_ACTIVITIES table using the user login id as one of the lookup columns. before and/or after an activity, simply call the method to insert an activity code and/or description.

now, you mentioned a small app so logging using the database may be OK. if it's a huge app, performance may be an issue.
 
Look ma! I'm selling my stuff!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic