Gossamer Forum
Home : Products : DBMan : Customization :

View logs per User only

Quote Reply
View logs per User only
Is anyone familiar with a way to view the logs for a current user only? For example, a Wholesaler has 5 brokers. He would like to be able to view the logs for his brokers only to check their activity.
Quote Reply
Re: [bbooker] View logs per User only In reply to
Seems you'd have to create a separate log funtion (subroutine) based on user id. Perhaps there's a better way?

Lemme think about it....

Are you using auto-generate?

It'd take some hacking. Give us/me some more details on what you're trying to accomplish.
Quote Reply
Re: [Watts] View logs per User only In reply to
No I am not using auto-generate.


This database includes Wholesalers (administrator) that have 6-8 brokers each under them. We are looking for a way for the Wholesaler to track his/her brokers activity, without being able to view other Wholesalers information.

Does that make sense?
Quote Reply
Re: [bbooker] View logs per User only In reply to
Some threads you might want to check out here in the forum or in the DBMan FAQ.
All the forum links may not still be correct as the threads are for an earlier version of the forum.

--------------
Topic: Formatting the log file
bbooker 08-May-2002
http://gossamer-threads.com/p/195115
---------------
Admin view of log file and List of last 5 logged in users (FAQ Title)
Topic: Log question
donm 03-Oct-1999
http://gossamer-threads.com/p/001135

-----
Log File Viewer/Editor [ Mod ] by AstroBoy
http://gossamer-threads.com/scripts/resources/Attach/288-logfile.txt

Topic: Log File Viewer/Editor
Philip_Clark 20-Nov-2000
http://gossamer-threads.com/p/114266
Also: http://gossamer-threads.com/p/1179

-----------
Add three fields of the database to the default.log (FAQ Title)
Topic: default.log
web dog 12-Aug-1999
http://gossamer-threads.com/p/000692
--------------


Do you have permissions set up for each Wholesalers (administrator)? If so you may be able to modify the mods above to just pull in certain records? Do you broker records have an indication within them as to who their wholesaler is? If so then adding that field to the log file may help you to return only specific brokers.

Perhaps a little info as to how your database is setup to define these things would help to find a solution.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [bbooker] View logs per User only In reply to
I've done something similar (and it wasn't easy) by using the relational mod, but it was for grouping records by user not for logging.

Who creates the records? The brokers themselves?

You could assign each broker a "Wholesaler ID" and then have an external text file (much like the log) that get appended each time a broker modifies/adds/deletes/views a record.

Here's what I'd do:
Have a hidden field "WID" (wholesaler ID)
<INPUT TYPE="hidden" NAME="WID" VALUE="$rec{'WID'}">

and then under view_success, modify_success, add_success and delete_success (or whatever they are actually called) add this code:

open(LOGIT, ">>/mnt/web/guide/YourDomain/www/logs/$in{'WID'}.txt") or die "Nada Can Do \n";
select(LOGIT);
print qq|$in{'whatever'} has added a record|;
close(LOGIT);

This assumes you have created a folder called "logs" in the public part of your website. Change the path to match yours (do not use the http;//www.domain.com "URL" it must be the "path")

Then you can have another separate dbman that the wholesalers log into and by using the "external text" mod you can pull in each one of their logs or display the .txt file however you want.

The hardest part will be assigning the WID for each broker - check out the mod for adding extra fields to the password file. This might be a way to do it and have it pull in for each record.

Try adding the WID field as a pull down for testing purposes and see if you can get it to write to the logs first.
Quote Reply
Re: [Watts] View logs per User only In reply to
Thanks all. I'll work on that and come back if I need help. I appreciate your time. Initial stabs looks like thats working.