Link to "Logging"

Message board links from 2010 as taken from the Internet Wayback Machine pages.
Post Reply
User avatar
admin
Site Admin
Posts: 159
Joined: Mon Aug 26, 2013 3:47 pm

Re: Link to "Logging"

Post by admin »

08-25-2009 5:16 PM
Rob
Top 25 Contributor
Joined on 08-25-2009
Posts 20

Logging
Reply Contact

I've added logging after several occasions where poeple were adament they had submitted there picks or picks were submitted but for some reason were not added in to the database. It has been a lifesaver for me many times. Its also a great stats tool if you want to see the activity on your site.

The code below i have added to the common.asp file and then called from anywhere in the format: Loginfo("YOUR MESSAGE GOES HERE.")

'---------------------------------------------------------------------------
' LogInfo(): Logs user activity.
'---------------------------------------------------------------------------
Sub LogInfo(strLog)
on error resume next
Set fs = CreateObject("Scripting.FileSystemObject")
Wfile=server.mappath(".") & "\logs\activity.log"
if not fs.FileExists(Wfile) then
fs.CreateTextFile Wfile
end if
Set afile = fs.OpenTextFile(Wfile,8,TristateUseDefault)
vbDateTime = DateAdd("h",-TIME_ZONE_DIFF,Now())
afile.WriteLine(FormatDateTime(vbDateTime , vbLongDate) & ", " & FormatTime(vbDateTime) & "," & Session(FootballPoolUsername) & "," & strLog)
afile.Close
end Sub

Here is a sample of my log...

18 August 2009, 10:20 am,Steve McCoy,Logged in.
18 August 2009, 10:20 am,Steve McCoy,Visited Results for week 23.
18 August 2009, 10:22 am,Steve McCoy,Submitted picks for week 24,9,12,28,28,9,9,9,25
18 August 2009, 10:22 am,Steve McCoy,Emailed their picks to sjlm18@bigpond.com
18 August 2009, 10:29 am,John Berry,Logged in.
18 August 2009, 10:37 am,John Berry,Submitted picks for week 24,12,12,9,12,25,12,12,25
18 August 2009, 10:38 am,John Berry,Submitted picks for week 24,12,12,9,12,25,28,12,25
18 August 2009, 10:49 am,Shane Welsh,Logged in.
18 August 2009, 10:49 am,Shane Welsh,Visited Summary.
18 August 2009, 10:52 am,Shane Welsh,Visited Results for week 23.
18 August 2009, 10:52 am,Shane Welsh,Visited Summary.
18 August 2009, 11:23 am,Sue Peart,Logged in.
18 August 2009, 11:24 am,Sue Peart,Submitted picks for week 24,9,9,9,28,9,9,12,9
18 August 2009, 11:28 am,Steve Bray,Logged in.
18 August 2009, 11:29 am,Steve Bray,Submitted picks for week 24,25,12,28,9,25,9,12,9
18 August 2009, 11:32 am,Steve Bray,Visited Results for week 23.
18 August 2009, 11:33 am,Steve Bray,Visited Summary.
18 August 2009, 11:36 am,Dennis King,Logged in.
18 August 2009, 11:37 am,Dennis King,Submitted picks for week 24,25,12,9,12,25,12,9,25
18 August 2009, 12:29 pm,Hamish Durno,Logged in.
18 August 2009, 12:30 pm,Hamish Durno,Visited Summary.
18 August 2009, 12:30 pm,Hamish Durno,Visited Summary.
18 August 2009, 12:36 pm,Hamish Durno,Visited Results for week 23.
18 August 2009, 12:38 pm,Darryn Odering,Logged in.
18 August 2009, 12:39 pm,Darryn Odering,Visited Summary.
18 August 2009, 12:40 pm,Darryn Odering,Visited Results for week 23.
18 August 2009, 12:40 pm,Russell Smith,Logged in.
18 August 2009, 12:40 pm,Russell Smith,Visited Summary.
18 August 2009, 12:43 pm,Visited Standings.
18 August 2009, 1:05 pm,Dennis King #2,Logged in.
18 August 2009, 1:05 pm,Dennis King #2,Visited Summary.
18 August 2009, 1:06 pm,Dennis King #2,Submitted picks for week 24,9,12,9,9,25,9,9,25
18 August 2009, 1:07 pm,Dennis King #2,Submitted picks for week 24,25,12,9,9,25,9,9,25
18 August 2009, 1:08 pm,James Heath,Logged in.
18 August 2009, 1:08 pm,James Heath,Submitted picks for week 24,25,12,9,9,25,12,12,25
18 August 2009, 1:09 pm,Dennis King,Logged in.
18 August 2009, 1:09 pm,Dennis King,Submitted picks for week 24,25,9,9,9,25,12,9,25
18 August 2009, 4:23 pm,Eric Williams,Logged in.
18 August 2009, 4:24 pm,Eric Williams,Visited Results for week 23.
18 August 2009, 4:28 pm,Eric Williams,Visited Summary.
18 August 2009, 4:31 pm,Darren Smith,Logged in.
18 August 2009, 4:31 pm,Darren Smith,Visited Summary.
18 August 2009, 5:02 pm,Belle Townsend,Logged in.
18 August 2009, 5:02 pm,Belle Townsend,Visited Summary.
18 August 2009, 5:33 pm,Don Graham,Logged in.
18 August 2009, 5:33 pm,Don Graham,Visited Results for week 23.
18 August 2009, 5:34 pm,Don Graham,Visited Summary.
18 August 2009, 5:34 pm,Don Graham,Visited Standings.
18 August 2009, 5:37 pm,Don Graham,Submitted picks for week 24,25,9,12,9,25,12,9,25
18 August 2009, 5:56 pm,Jeremy Wells,Logged in.
18 August 2009, 5:56 pm,Jeremy Wells,Visited Results for week 23.
18 August 2009, 5:57 pm,Jeremy Wells,Visited Summary.
18 August 2009, 5:58 pm,Jeremy Wells,Submitted picks for week 24,25,12,9,9,25,12,12,25
18 August 2009, 6:09 pm,Helen vanden Bogaert,Logged in.
18 August 2009, 6:09 pm,Helen vanden Bogaert,Visited Standings.
18 August 2009, 6:10 pm,Helen vanden Bogaert,Visited Summary.
18 August 2009, 6:12 pm,Helen vanden Bogaert,Visited Results for week 23.
18 August 2009, 6:14 pm,Helen vanden Bogaert,Submitted picks for week 24,25,9,9,12,25,9,9,25
18 August 2009, 6:14 pm,Helen vanden Bogaert,Emailed their picks to moi@clear.net.nz
19 August 2009, 8:11 am,Callahan Laird,Logged in.
19 August 2009, 8:12 am,Garry Hanger,Submitted picks for week 24,9,12,9,12,25,12,12,25
19 August 2009, 8:12 am,Callahan Laird,Submitted picks for week 24,12,25,28,12,12,9,25,12
19 August 2009, 8:12 am,Callahan Laird,Visited Summary.
19 August 2009, 8:12 am,Callahan Laird,Visited Summary.
19 August 2009, 8:12 am,Callahan Laird,Visited Results for week 23.
19 August 2009, 8:12 am,CallahaCallahan Laird,Visited Results for week 23.
19 August 2009, 8:13 am,Callahan Laird,Visited Summary.
19 August 2009, 8:13 am,Callahan Laird,Visited Summary.
19 August 2009, 8:13 am,Callahan Laird,Visited Summary.
19 August 2009, 8:14 am,Callahan Laird,Visited Summary.
19 August 2009, 9:08 am,Cory Te Huia,Logged in.
19 August 2009, 9:08 am,Cory Te Huia,Visited Summary.
19 August 2009, 10:56 am,Paul Crichton,Logged in.
19 August 2009, 11:34 am,Jeremy Baars,Logged in.
19 August 2009, 11:35 am,Jeremy Baars,Submitted picks for week 24,25,9,9,9,25,28,9,9
19 August 2009, 12:34 pm,Cory Te Huia,Logged in.
19 August 2009, 12:34 pm,Cory Te Huia,Visited Summary.
19 August 2009, 12:35 pm,Cory Te Huia,Submitted picks for week 24,9,9,12,12,9,9,12,9
19 August 2009, 12:36 pm,Cory Te Huia,Logged in.
19 August 2009, 12:38 pm,Cory Te Huia,Submitted picks for week 24,25,9,28,12,9,9,12,25
19 August 2009, 12:38 pm,Cory Te Huia,Emailed their picks to ctehuia@hop.org.nz
19 August 2009, 2:55 pm,Nick Price,Logged in.
19 August 2009, 2:55 pm,Nick Price,Visited Results for week 23.
19 August 2009, 2:55 pm,Nick Price,Visited Summary.


Cheers
Rob


Filed under: customization
08-25-2009 6:51 PM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: Logging
Reply Contact

Heck of an idea Rob!! I may have to try this.

What I'm interested in viewing your log is where it says "emailed their pics to blah@blah.net". What's that exactly? I don't remember that happening. Is that another customization? I think mailing the user's their picks is another great idea!
08-25-2009 7:11 PM In reply to
Rob
Top 25 Contributor
Joined on 08-25-2009
Posts 20

Re: Logging
Reply Contact

Yes that is another add-on of mine. Once their picks have been submitted they are redirected to a confirmation page to confirm their picks have been submitted. At this stage they can see a summary of their picks and have the opportunity to email themselves (or anyone else) their selections. The code is a bit more involved and is adapted to work with rugby but i'm happy to post it if you want to pick through it.

Cheers
Rob


Filed under: customization
08-26-2009 6:07 AM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 58

Re: Logging
Reply Contact

Thats a nice add-on. I wouldnt mind seeing that.



Cheers.
08-26-2009 10:11 AM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 323

Re: Logging
Reply Contact

ya the email feature would be cool to check out.

Page 1 of 1 (5 items
Post Reply