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

Ask A Question

Stats

  • Questions 274k
  • Answers 274k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not supported by Scala. ScalaQL: Language-Integrated Database Queries… May 13, 2026 at 2:26 pm
  • Editorial Team
    Editorial Team added an answer Read the Java Concurrency Tutorial. Make multiple threads to do… May 13, 2026 at 2:26 pm
  • Editorial Team
    Editorial Team added an answer You can use SimpleXMLElement::xpath() to get all product elements that… May 13, 2026 at 2:26 pm

Related Questions

We have a WinForms application that uses SQL server to store its data. To
There is a need from a customer to log every data change to a
A customer has a web based inventory management system. The system is proprietary and
This was a hard question for me to summarize so we may need to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.