logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
NW Log Files
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Technical support
View previous topic :: View next topic  
Author Message
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Thu Dec 07, 2006 4:27    Post subject: NW Log Files Reply with quote

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
View user's profile Send private message Send e-mail
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Thu Dec 07, 2006 4:43    Post subject: Reply with quote

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
View user's profile Send private message
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Thu Dec 07, 2006 4:51    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Rowell



Joined: 11 Nov 2006
Posts: 3

PostPosted: Thu Dec 07, 2006 7:02    Post subject: Reply with quote

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
View user's profile Send private message
OVLD_NZ



Joined: 14 Nov 2006
Posts: 18

PostPosted: Thu Dec 07, 2006 7:41    Post subject: Reply with quote

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
View user's profile Send private message
Grumalg



Joined: 04 Nov 2005
Posts: 70

PostPosted: Thu Dec 07, 2006 15:56    Post subject: Reply with quote

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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Fri Dec 08, 2006 12:39    Post subject: Reply with quote

There is also an option in nwnx.ini.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Kallistor



Joined: 09 Dec 2006
Posts: 13

PostPosted: Sat Dec 09, 2006 13:17    Post subject: Reply with quote

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
View user's profile Send private message
Morpheus



Joined: 18 Oct 2006
Posts: 39

PostPosted: Sun Dec 10, 2006 18:03    Post subject: Reply with quote

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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Dec 10, 2006 20:09    Post subject: Reply with quote

Did you also edit the nwnplayer.ini in your profile (c:\document and settings\....) ? I think this one take precedence.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Kallistor



Joined: 09 Dec 2006
Posts: 13

PostPosted: Sun Dec 10, 2006 23:55    Post subject: Reply with quote

@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
View user's profile Send private message
Grumalg



Joined: 04 Nov 2005
Posts: 70

PostPosted: Mon Dec 11, 2006 4:51    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Dec 11, 2006 7:36    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Kallistor



Joined: 09 Dec 2006
Posts: 13

PostPosted: Mon Dec 11, 2006 11:57    Post subject: Reply with quote

@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
View user's profile Send private message
Kallistor



Joined: 09 Dec 2006
Posts: 13

PostPosted: Mon Dec 11, 2006 12:02    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Technical support All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group