Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Logging File
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Logging File
Subject
:
Logging File
From: "Jonathan Fleming" <
email@hidden
>
Date: Tue, 23 Sep 2003 20:29:25 +0100
G'day One and All,
I've got this annoying duplicate .log file thing going on and I'd like to know if it's nornal or not.
After having tracked the user ip and other header details they are sent to a User.log file in /Library/WebObjects/ if I login the detais are sent there and all is well. If I shut down the app, restart it and login again the second login attempt is loged in the same file, but if I logout within the application and then login again on the same session the tracked details are loged in a new ly created file of the same name - User.log, but with the date and time appended to it so that it's unique.
Is this meant to be happening? I'd much prefer all the details in the one file... how can I achieve that
This is the code I'm using:
// in Application
statisticsStore().setLogFile("/Apple/Library/WebObjects/UserLogs/NameOfApp_User.log", 10^7);
}
// log the user and referer from MyClass.java constructor
String userName = (String) valueForKeyPath("session.user.loginName");
String clientIP = context.request().headerForKey("remote_addr");
NSTimestampFormatter formatter = new NSTimestampFormatter("%b/%d/%Y:%H:%M:%S %z");
((Application)application()).statisticsStore().logString("ip = " + clientIP + " || " + "user = " + userName + " || " + formatter.format(new NSTimestamp()) + "\n");
Anyone?
Jonathan :^)
_________________________________________________________________
Use MSN Messenger to send music and pics to your friends
http://www.msn.co.uk/messenger
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
Prev by Date:
Re: Apache WO Adaptor: Marking instance 9 dead
Next by Date:
Re: Warning: Request will be REDIRECTED to non-refusing instance
Previous by thread:
Re: Apache WO Adaptor: Marking instance 9 dead
Next by thread:
Re: IP Address Log from Direct Action
Index(es):
Date
Thread