Skip to content

Log rotator

Does anyone know know of a log rotator that works with NWN:EE?

Comments

  • SymphonySymphony Member, Developer Posts: 142
    https://trello.com/c/ITGq0GRw It's been wanted by the community, would be nice if an .ini setting could be added with customizable name string, and possibly a new line added to the top with information (Server name, account - character name)
    Speedy_Zdunahan
  • MalisharaMalishara Member Posts: 16
    That's good! But it doesn't help me right now. :(
  • EchoDMEchoDM Member Posts: 4
    I havent tried Gnomish Log Rotator with NWN:EE yet but I know it worked with NWN. Have you tried it?
  • elegoselegos Member Posts: 12
    If on Linux: have you tried logrotate, the Linux most known log rotator? Fairly easy to configure.
  • Speedy_ZSpeedy_Z Member Posts: 4
    I tried it, but I can't get it to work right...

    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.
  • RavenmystRavenmyst Member Posts: 7
    edited March 2021
    I am the author of https://github.com/noblesigma/NWNLogRotator

    ______________________________________________
    -- 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.
    Post edited by Ravenmyst on
  • EchoDMEchoDM Member Posts: 4
    Speedy_Z said:

    I tried it, but I can't get it to work right...

    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.

    To modify the GLR .exe, just right click the file, select Edit, point it to your installation.
    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.
  • icelandiaicelandia Member Posts: 16
    Ravenmyst said:

    I am the author of https://github.com/ravenmyst/NWN-Log-Rotator

    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've been trying to get your rotator to work for the past hour.
    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?
  • RavenmystRavenmyst Member Posts: 7
    edited January 2019
    Before debugging the batch job, if the log rotation process isn't working, jump right into that first, imo. Batch job looks fine from here and if the only problem you have is that it doesn't create the log, try to create the log manually by following the tips below. Once you fix the below, you can then fix the batchwith whatever you did to solve the issue.

    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.

  • RavenmystRavenmyst Member Posts: 7
    edited January 2019
    ok, after closely reading, and I know this is going to sound lame, but try changing -p and -d arguments to run with 'forward slash', as they are in the examples, instead of 'back slashes' in the path, in contrary to what windows wants. It's been a time since I made this but I recall that being an issue.

    node RavenLogRotator -s Arelith -p "C:/Users/Ice/Documents/Neverwinter Nights/logs/nwclientLog1.txt" -d "C:/Users/Ice/Documents/Neverwinter Nights/logs/SavedLogs"
    icelandia
  • icelandiaicelandia Member Posts: 16
    Ravenmyst said:

    ok, after closely reading, and I know this is going to sound lame, but try changing -p and -d arguments to run with 'forward slash', as they are in the examples, instead of 'back slashes' in the path, in contrary to what windows wants. It's been a time since I made this but I recall that being an issue.

    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.

  • icelandiaicelandia Member Posts: 16
    Ravenmyst said:

    ok, after closely reading, and I know this is going to sound lame, but try changing -p and -d arguments to run with 'forward slash', as they are in the examples, instead of 'back slashes' in the path, in contrary to what windows wants. It's been a time since I made this but I recall that being an issue.

    node RavenLogRotator -s Arelith -p "C:/Users/Ice/Documents/Neverwinter Nights/logs/nwclientLog1.txt" -d "C:/Users/Ice/Documents/Neverwinter Nights/logs/SavedLogs"

    I don't really know if you plan to keep working on your project, but I've been using the log rotator for the past few days. The rotator part works just fine, but the text parser does not - it simply stops at certain number of characters, and ignores the rest of the text.

    This is a screeny of a 140kb log, for example.

    Up until that point, the log is working as intended.
    Combat_Wombat
  • RavenmystRavenmyst Member Posts: 7
    edited May 2020
    Hmm, sorry you're having that issue. That's odd. I just stress tested a huge log file and parsed a 1+k file with tons of actors and had no issue like that at all.


    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..)
    Post edited by Ravenmyst on
  • icelandiaicelandia Member Posts: 16
    Ravenmyst said:

    Hmm, sorry you're having that issue. That's odd. I just stress tested a huge log file and parsed a 1+k file with tons of actors and had no issue like that at all.


    1) Please try manually parsing that file using the web demo here:
    https://ravenmyst.net/work/nwnlogrotator/


    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.
  • RavenmystRavenmyst Member Posts: 7
    edited June 2020
    This is fixed in the exe version.
    Post edited by Ravenmyst on
  • RavenmystRavenmyst Member Posts: 7
    edited March 2021
    So I decided to make it a simpler program too (just an exe now).

    https://github.com/noblesigma/NWNLogRotator

    Let me know if you need help!
    Post edited by Ravenmyst on
    WilliamDraco
  • RavenmystRavenmyst Member Posts: 7
    edited June 2020
    Hey guys. Arelith is now supported on the log rotator. If it has an issue, please raise it on the Github link above. Enjoy!
    Symphonydunahan
Sign In or Register to comment.