Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 93865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:24:42+00:00 2026-05-10T23:24:42+00:00

The customer wants us to log the actions that a user performs on our

  • 0

The customer wants us to ‘log’ the ‘actions’ that a user performs on our system: creation, deletion and update, mostly. I already have an aspect that logs the trace, but that works at a pretty low level logging every method call. So if a user clicked on the button ‘open medical file’ the log would read:

  1. closePreviousFiles(‘patient zero’)
  2. createMedicalFile(‘patient zero’) –> file #001
  3. changeStatus(‘#001’) –> open

while the desired result is:

  1. opened medical file #001 for patient zero

I’m thinking of instrumenting the Struts2 actions with log statements, but I’m wondering… is there another way to do that? I might use AspectJ again (or a filter) and keep the logic in just one place, so that I might configure the log easily, but then I’m afraid everything will become harder to understand (i.e. ‘the log for this action is wrong… where the heck should I look for the trouble?’).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:24:42+00:00Added an answer on May 10, 2026 at 11:24 pm

    Sounds like your client wants an audit trail of the user’s actions in the system.

    Consider that at each action’s entry point (from the web request) to start an audit entry with an enum/constant on the action. Populate it with information user has provided if possible.

    At exit/finally, indicate in the audit if it is successful or failed. An example in pseudocode:

    enum Actions {   OPEN_MEDICAL_FILE   ... }  void handleRequest(...) {   String patient = ...;   Audit audit = new Audit(OPEN_MEDICAL_FILE);   audit.addParameter('patient', patient);   try {      ... more things ..      audit.addParameter('file', '#001');      ... more things ...      audit.setSuccess();   } finally {     audit.save();   } } 

    What is important here is that all user actions are saved, regardless of success or failure. Also, the client really really need to know all relevant information along with the action.

    Since we are logging action constants and data, the presentation of the audit to the client can be seperately coded. You gain flexibility too, since a change of presentation string (eg. ‘opened medical file #001 for patient zero’ to ‘patient zero #001 medical file opened) is not determined at the time of the action, but later. You don’t have to remassage the audit data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have hibernate-based system and customer wants to get human-readable names of PK and
I want to record that last update of user that log in into my
Overview : I created a system that have Customer area and Admin area. Both
Like many web applications (business) the customer wants a form that will search across
I have built a website and now the customer wants to split it between
I'm developing a website that uses some complex computations (NLP-related). My customer wants to
We have a log table that has a message column that sometimes has an
I would like the weblogs that asp.net/IIS7 uses to have the customer's username and
We have an application which we need to allow users from our customer's systems
I have a rails application with an administration interface that allows a user CRUD

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.