#122279 - 2004-07-07 04:30 PM
Re: Multiuser logging
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
Are you anting a current information only? or are you wanting a log file for history.
for current information only, look into using the writeprofilestring() command, and log current information to a central .ini file.
Code:
$ = writeprofilestring("\\server\share\logfile\log.ini","kixscriptlogging",@userid,@ipaddress0 + "," + @wksta)
you will get a ini file like this...
Code:
[kixscriptlogging]
bsmith=127.0.0.1,pc01
If you are wanting a history log file..... you could use a shell command like this, with out having to worry about opening the file in kix.
Code:
shell '%comspec% /c echo ' + @userid + ',' + @ipaddress0 + ',' + @wksta + ' >> g:\logs\log.txt'
Bryce
Edited by Bryce (2004-07-07 04:47 PM)
|
|
Top
|
|
|
|
#122283 - 2004-07-07 04:46 PM
Re: Multiuser logging
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
Quote:
Should that not be two redirects?
>> g:\logs\log.txt
yes you are correct that should be >>
Edited by Bryce (2004-07-07 04:47 PM)
|
|
Top
|
|
|
|
#122285 - 2004-07-07 04:59 PM
Re: Multiuser logging
|
Andy Cippico
Fresh Scripter
Registered: 2003-01-09
Posts: 17
Loc: UK
|
Yep - that's what I was expecting to hear. I don't think you can multiuser-write to a text file. This kind of answers my question. An Access DB would be far easier to query, too. I just don't fancy writing the code...
|
|
Top
|
|
|
|
#122287 - 2004-07-07 08:25 PM
Re: Multiuser logging
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I write a file at logon named after the computer where the logon occurs. The file is written to a hidden share on the logonserver authenticating the user. An admin program walks the DC's hidden shares and collects the files, parses them, and write the data into an Oracle database so that it can be queried.
This has been the most robust and network friendly methodology I could come up with over the years.
|
|
Top
|
|
|
|
#122288 - 2004-07-07 08:33 PM
Re: Multiuser logging
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
You can use the Logger() UDF which addresses this issue..
Kent
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1172 anonymous users online.
|
|
|