Help with User Logs.

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Madimant
Posts: 35
Joined: Tue Aug 08, 2017 11:39 pm

Help with User Logs.

Post by Madimant »

I'm trying to set up a user session log file.
I want to see when somebody logs onto the system and then leave again.

I created a StaffLog BO which I referenced to my Staff members. (StaffMember.om_StaffLogs)
When the staff member login I create a new StaffLog record in the business rules of the Notifier 'LoginNotification' using the Session_ID, timestamp and LoggedInStaffMember.
Then when the user logs off I find the StaffLog record with the correct Session_ID with a rule in the 'LogoutNotification' and update the logout time.
Up to here it all works as expected.

Now the problem comes where most users don't logoff... they just abandon the webpage and my StaffLog record sits open with no logout time.
Is there a way to overcome this and close the Record when the user becomes inactive?

I tried the session timeout on the user but cannot get that to work successfully?

Tj
Tj
Using Version 8.6 Build 2917 - mySQL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Help with User Logs.

Post by Jaymer »

Madimant wrote:... and close the Record when the user becomes inactive?
I think the definition of that (inactive) is when they timeout.
If you were to monitor one of the output windows (probably Tomcat) or maybe the Logger window, you’ll see when the Logout Notification becomes active.

There’s no way for anyone to know the user isn’t sitting there looking at data. So unless they explicitly log off, Your log isn’t going to reflect that until their timeout comes around.
You’re on the right track.
Did you model your code after the CRM example?
The CRM example has a user status query that shows online/offline status.

And you say you tried timeout of the user. That only started maybe 2 years ago. Each user can Now have a timeout time. Set it to 1 or 2 minutes and watch the logs and try and do a refresh on a query (after your interval) and see if you get a session timeout msg. If not, then true, it’s not working.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Madimant
Posts: 35
Joined: Tue Aug 08, 2017 11:39 pm

Re: Help with User Logs.

Post by Madimant »

Thanks Jaymar...

Yes I did model my app on the CRM LoginNotification and LogoutNotification.
There is already attributes that change value on login and logout... I just added my own rules.

I'm not too worried if the user is sitting staring at the screen... If after 10mins no action closes the session.

I getting stuck with the timeout numbers.

In the BASServer.props the Session Timeout was set at 1 800 000 which I presume is in millisecs (30 mins) - I changed it to 60 000 (10 mins)
in the webapp.props the Session Timeout was set at 1 800 and this would be in seconds (30mins)??? - Changed it to 600 (10 mins)
Reboot system...

What should be in the User SessionTimeout setting? Minutes, Seconds or millisecond.?

I set the Session Timeout in the StaffMember to 60 000 and nothing happens.. change it to 600 and nothing happens ....change it to 60 and nothing happens ....change it to 10 and it times out randomly after 15 to 30 secs idle.
Cannot get a handle on the number?

Ideally, I would prefer to have a 10min timeout with a response back to LogoutNotification.
Help is appreciated.

Tj
Tj
Using Version 8.6 Build 2917 - mySQL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Help with User Logs.

Post by Jaymer »

You are close,
See this. https://www.awareim.com/forum/viewtopic.php?f=1&t=10911
Same issue been asked before.
And I’m not sure on the units used in RegUser. Not at my desk.

I’d set the user timeout to 60 (I’m thinking that one is in seconds) and wait over 2 mins, and see if you can Refresh a query.
An explicit timeout in a user table is supposed to override the setting in those other 2 locations.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply