Log rotator
Malishara
Member Posts: 16
Does anyone know know of a log rotator that works with NWN:EE?
0
Comments
The glr.exe file uses the old NWN path to get the nwclientLog1.txt file and then sends the rotated file to the old log folder. Unfortunately, I don't know how to modify an .exe file to set up the new path.
I suppose it would work if my EE install was just like my old NWN install, but I have to keep both versions because I still play on a server that didn't upgrade to EE. So, that's not an option for me.
Hopefully, log saving becomes available in EE later on or someone updates GLR. It was a handy thing to have.
______________________________________________
-- old post---
I spent a long time creating it and found it to work very well. To get it to rotate, you'd need to use/modify the batch files on there.
It's medium difficulty, but entirely worth it. I'm here if you have specific questions.
I was able to get mine set up for both my DM client and my player client, which has been very useful since I do both from time to time.
Everything is installed as I think it should be installed, configured a .bat launcher to automatically run NWN and connect to a specific server, but the log doesn't rotate.
It's created the folder intended for the server in the specified location, based on the -s parameter, but there is no content in the folder.
Here's what I'm working with.
@echo off echo *** Launching Server *** set SteamDir="C:\Program Files (x86)\Steam" cd /D %SteamDir% set EEBinDir="E:\SteamLibrary\steamapps\common\Neverwinter Nights\bin\win32" start /wait Steam.exe -applaunch 704450 +connect game.arelith.com:5122 echo *** Neverwinter Nights Terminated *** echo *** Processing Logs *** node RavenLogRotator -s Arelith -p "C:\Users\Ice\Documents\Neverwinter Nights\logs\nwclientLog1.txt" -d "C:\Users\Ice\Documents\Neverwinter Nights\logs\SavedLogs" exit
Any idea what's wrong here?
To start simple, the best way is to make sure you have a log file that is ripe in your log folder (spam a few lines, close the game, open it, make sure its populated well and has a few actors and maybe combat.) You can use existing ones, just name them right or reference them with the argument.
Once you have that, start command prompt (start>run) or windows key + r, cmd enter, then paste your line starting with
when you're there, type
cd "C:\Path To RavenLogRotator"
then it should take you to the directory. you can also crawl one directory at a time, whatever is faster.
once at the same enviornment path as the Ravenlogrotator js file, you can run in your CMD
node RavenLogRotator -s Arelith -p "C:\Users\Ice\Documents\Neverwinter Nights\logs\nwclientLog1.txt" -d "C:\Users\Ice\Documents\Neverwinter Nights\logs\SavedLogs"
from there, it should take your file, C:\Users\Ice\Documents\Neverwinter Nights\logs\nwclientLog1.txt, make a folder C:\Users\Ice\Documents\Neverwinter Nights\logs\SavedLogs\Arelith\ if it doesn't exist, then make a file when it's done (html)
This procedure can help you to find why the log file is not being created. Does it have any errors?
Let me know if that isn't especially helpful or you have other problems.
node RavenLogRotator -s Arelith -p "C:/Users/Ice/Documents/Neverwinter Nights/logs/nwclientLog1.txt" -d "C:/Users/Ice/Documents/Neverwinter Nights/logs/SavedLogs"
Well! Thanks for the prompt response, and indeed that happened to fix it!
The HTMLs files should be easy enough to clean up and parse to make them somewhat readable... and I needed an excuse to actually practice some CSS.
This is a screeny of a 140kb log, for example.
Up until that point, the log is working as intended.
1) Please try manually parsing that file using the web demo here:
-- no longer available edited out.--
if that issue happens there, is it possible to send that entire file to me? week expiration pastebin.com is great!
If it doesn't happen, are you using the Looping one? that advanced scriptlet is a little out of date but the main script shouldn't do that.. (hopefully..)
I copy-pasted the content of one of the unaltered logs (140kbs) into the online version, and both in Mozilla and Chrome, the page just ends up loading infinitely, with a "this page is not responding" popping up every couple of minutes. Eventually it even stops other pages (youtube, in example, simply stops loading while the parser is supposed to be working).
I tried it with a few files, in fact, and always got the same result. I only see the online version working with veeeeeeery small files - 11kbs, exactly.
I'm sending you a pastebin link on PM of a pretty large log. Hopefully it helps, since this is potentially a very good tool to use with NWN and it'd really take a lot of weigh from my back.
https://github.com/noblesigma/NWNLogRotator
Let me know if you need help!