View previous topic :: View next topic |
Author |
Message |
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Thu Dec 07, 2006 4:27 Post subject: NW Log Files |
|
|
Can someone please explain to me how to get the NWServer to create the logs and where they are located. I have tried and tried but cannot get it.
Plus, how come there are so many copies of nwn.ini and nwnplayer.ini all over the place? It seems like NWN creates one in several different directories. _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Thu Dec 07, 2006 4:43 Post subject: |
|
|
The log files by default can be found in the temporary directory.
The fastest way to get to them is to paste this into Windows Explorer's address bar and hit Enter.
%TEMP%\NWN2
You can change the default location using Senalaya's suggestion, here: http://www.nwnx.org/phpBB2/viewtopic.php?t=604 _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Thu Dec 07, 2006 4:51 Post subject: |
|
|
OK - I have seen this folder before when searching, but I cannot get NW server to do the WriteTimestampedLogEntry(). Anyone know if any particular settings need to be changed? _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri |
|
Back to top |
|
|
Rowell
Joined: 11 Nov 2006 Posts: 3
|
Posted: Thu Dec 07, 2006 7:02 Post subject: |
|
|
I've looked everywhere for log files that actually contain what my WriteTimeStampedLog send to it...but I've yet to be successfully.
I think we can add that command to the list of things not currently working. |
|
Back to top |
|
|
OVLD_NZ
Joined: 14 Nov 2006 Posts: 18
|
Posted: Thu Dec 07, 2006 7:41 Post subject: |
|
|
In your my document folder there should be an Neverwinter Nights 2 folder. In there there's a nwplayer.ini.
This nwplayer.ini under the Server Options section has the following configuration setting.
Scripts Print To Log=0
Scripts Print To Screen=0
Use these to modify how NWN2 writes to the log file. You can try these commands in the nwplayer.ini in the NWN2 game directory as well. _________________ The World of Judur - The Shadow has Awoken |
|
Back to top |
|
|
Grumalg
Joined: 04 Nov 2005 Posts: 70
|
Posted: Thu Dec 07, 2006 15:56 Post subject: |
|
|
Add a "LOGS=.\logs" in the [Alias] section of the install path nwn.ini and log will go to a logs.0 dir in install tree. No file rotation though.
--- Grumalg --- |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Dec 08, 2006 12:39 Post subject: |
|
|
There is also an option in nwnx.ini. _________________ Papillon |
|
Back to top |
|
|
Kallistor
Joined: 09 Dec 2006 Posts: 13
|
Posted: Sat Dec 09, 2006 13:17 Post subject: |
|
|
I have been bashing around with logging to files for a bit now. I have done the 'oh bugger the WriteTimestampedLogEntry function doesnt work now' and the 'oh bugger there are two nwnplayer.ini files' and have now changed some of the WriteTimestampedLogEntry to PrintString as instructed by Obsidian. Now when I run this module in a normal NWNServer it prints the statement in the PrintString function to the log file, but when I start this module through NWNX4 v1.05 the PrintString statement does not get printed to the log file but the heart beat '.' do. Has any one else had this trouble or am I doing something a little out of whack? |
|
Back to top |
|
|
Morpheus
Joined: 18 Oct 2006 Posts: 39
|
Posted: Sun Dec 10, 2006 18:03 Post subject: |
|
|
I think the log function built into NWN2 is broken. At least it doesn't work for me. I created the log directory and modified the ini and see the log rollover directories being created by NWN2, but the function does not work, FYI. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Dec 10, 2006 20:09 Post subject: |
|
|
Did you also edit the nwnplayer.ini in your profile (c:\document and settings\....) ? I think this one take precedence. _________________ Papillon |
|
Back to top |
|
|
Kallistor
Joined: 09 Dec 2006 Posts: 13
|
Posted: Sun Dec 10, 2006 23:55 Post subject: |
|
|
@Morpheus: Logging isnt broken its just changed. You cant use the WriteTimestampedLogEntry function anymore as that is definitely broken but they idea is now to use PrintString as mentioned by Obsidian programmer Brock Heinz in this forum post http://nwn2forums.bioware.com/forums/viewtopic.html?topic=508404&forum=114&highlight=log%20files
Have a look at PrettyDebug() in "ginc_debug" and it shows you how to print to screen and file.
@Papillon: I did a little more testing and what I found is that if I launch NWNX4 through the command prompt window using NWNX4_controller -interactive the log file contains the correct string in it, but if I start the service from the Command line or through the Administrative Tools > Services then the log file is missing the strings.
All I have is a module with a OnHeartBeat event that prints a tring to the logfile as shown:
Code: | void main()
{
PrintString("for fark sake, print will ya");
} |
If any take offense at the words my apologies, it was late at night and it has been a long road.
And the two copies of the ini files did have me baffled for a while but I have made the appropriate changes in both of them:
nwnplayer.ini - same settings in both My Documents\Neverwinter Nights 2 and C:\nwn2server
Code: | [Server Options]
Validate Character Ownership=1
Pause Loading During Cutscenes=1
Scripts Print To Log=1
Scripts Print To Screen=1 |
and nwn.ini
Code: |
[Alias]
LOGS=.\logfiles
[Game Options]
Memory Level=1
Memory Access=0
Debug Text=1
Object Selection Mode=3
DebugMode=1
|
and just to be complete a portion of the nwnx.ini file
Code: | # NWNX4 configuration file
# These are the default values for NWNX4.
# Path to NWN2 installation (where nwn2server.exe is located)
# no default. You really have to specify it, currently.
nwn2 = C:\NWN2Server
# You can override the tempory path NWN2 uses
# This is where NWN2 will put its logfiles (among other files)
# no default
# nwn2temp = C:\NWN2Server\Logfiles
|
and a copy of the log file
Code: | [Mon Dec 11 07:56:43] Loading Module: Test
TRANS: [Mon Dec 11 07:56:43]Not decompressing as not loading from a previously visited module.
TRANS: [Mon Dec 11 07:56:43]Setting up Stall Event now.
[Mon Dec 11 07:56:43]---- Server Options ----
Max Players: 6
Char Levels: (1-20)
Player Password: YES
DM Login Enabled: NO
Server Admin Login Enabled: YES
Post Game To Internet: NO
Game Type: Action
Difficulty: 2
PVP Setting: PARTY
Vault: SERVER
Only One Party: NO
Enforce Legal Characters: YES
Item Level Restrictions: YES
Player pausing: DISABLED
Auto Save: Enabled
Saving Characters in Saved Game
---- End Server Options ----
for fark sake, print will ya
.for fark sake, print will ya
for fark sake, print will ya
.for fark sake, print will ya
[Mon Dec 11 07:57:15] Server Shutting Down
[Mon Dec 11 07:58:02] Loading Module: Test
TRANS: [Mon Dec 11 07:58:02]Not decompressing as not loading from a previously visited module.
TRANS: [Mon Dec 11 07:58:02]Setting up Stall Event now.
[Mon Dec 11 07:58:02]---- Server Options ----
Max Players: 6
Char Levels: (1-20)
Player Password: YES
DM Login Enabled: NO
Server Admin Login Enabled: YES
Post Game To Internet: NO
Game Type: Action
Difficulty: 2
PVP Setting: PARTY
Vault: SERVER
Only One Party: NO
Enforce Legal Characters: YES
Item Level Restrictions: YES
Player pausing: DISABLED
Auto Save: Enabled
Saving Characters in Saved Game
---- End Server Options ----
......
|
So the first part of the logfile shows the strings being logged (this was started in -interactive mode and the second part of the logfile has only the '.' and no strings and this was in the -startservice mode. |
|
Back to top |
|
|
Grumalg
Joined: 04 Nov 2005 Posts: 70
|
Posted: Mon Dec 11, 2006 4:51 Post subject: |
|
|
WriteTimestampedLogEntry has been working fine for me. All I did was set the 'Scripts Print To Log=1' and use the alias entry 'LOGS=.\logs' to save the trouble of wadeing through a third dir tree to look at the logs.
--- Grumalg --- |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Mon Dec 11, 2006 7:36 Post subject: |
|
|
It's strange that the default value for "Scripts Print To Log" is 0. Seems like Obsidian doesn't care much about backwards compatibility.. |
|
Back to top |
|
|
Kallistor
Joined: 09 Dec 2006 Posts: 13
|
Posted: Mon Dec 11, 2006 11:57 Post subject: |
|
|
@Grumalg: Thanks for pointing that out Grumalg. I have never used WriteTimestampedLogEntry in v1.03 with Scripts Print To File=1. But let me ask you if you are running the server through NWNX4 in interactive mode or service mode? I have just tried it again with WriteTimestampedLogEntry instead of PrintString and nothing is printed in the logfile except for the '.' but in interactive mode it does print the string in the WriteTimestampedLogEntry function.
Last edited by Kallistor on Mon Dec 11, 2006 13:16; edited 1 time in total |
|
Back to top |
|
|
Kallistor
Joined: 09 Dec 2006 Posts: 13
|
Posted: Mon Dec 11, 2006 12:02 Post subject: |
|
|
I noticed while moving up to NWNX4 v1.06 that there was a hash in front of the nwn2temp = C:\NWN2Server\logfiles line in nwnx.ini file. Removing it didnt affect the result. I still believe that either using PrintString or WriteTimestampedLogEntry while running NWNX4 as a service does not produce results in the log file |
|
Back to top |
|
|
|