Results 1 to 14 of 14

Thread: New Chat Log Parser

  1. #1

    New Chat Log Parser

    For a long time now Anarchy Online has had the built-in capability to keep a log of a user defined group of channels, however while it is possible to read the logs ingame. The actual log file is not easily readable.

    After having some trouble using Khuri's ChatConverter and Halorn's Log Reviewer to try and parse my log file for the day, I decided to mock up a log parser of my own. It's a very simple parser, without any configuration options, but it will parse a several megabyte log file in just a few seconds.

    With Khuri's ChatConverter, my log files were way to large so I had to split them into pieces by hand, parse the pieces, and then combine the parsed version of the pieces. Also I noticed that when I parsed my tell messages for the day I would lose all the tells I sent to other players. (Yes, I did try both the online and offline versions.)

    With Halorn's Log Reviewer, I think I got it running correctly, but I'm not sure. I didn't put much effort into trying to make it work. I put the log file were it wanted it, set the settings, and let it run. It was still running 5 minutes later :/. Maybe it got finished and then just entered an infinite loop. Either way..... it didn't seem like it was really beyond a beta or alpha level development.

    So anway, I mocked up a new parser in Java. And go figure, the program was quite simple and very efficient. It's even able to handle a several megabyte log file without complaining =).

    Here's how it works:

    1. Download the Jar File

    2. Put the Log.txt file you want it to parse in the same folder as the Jar File.
    (Yes, the log file does have to be called Log.txt. And no, there is no configuration option to change this.)

    3. Double Click on the Jar File
    (If it asks you what program to use, go to java.com and update your version of java.)

    4. Now you're done. If you don't see the parsed log files that were created hit F5 to refresh the window. There should be a file for each channel that was found in the log file.



    For those who might be interested in the source code:

    Download the Source Code here.
    You'll need to change the extension to zip and then use your favorite extractor to view it. It's really simple. It's just one .java file with a main function.

    To Do:
    - Make sure the timestamps are being computed correctly (aka. match with GMT/AO time), DST offsets being the main concern at present
    - Deal with the links in a more advanced fashion, rather then just replacing them all with Removed Link
    - Allow the user to select which players they are or are not interested in parsing tells from
    - Give the user the option to just split the log file, into one log file per channel, or to split it and turn it into BBCode/HTML
    - Add a simple GUI



    PS: If somebody knows a great guide on how to set up logging within AO, and/or how to find the Log.txt file, please post a link here. I know that several ppl have written good guides on how to do this. I just don't have any links to them handy.

    PS: I also need suggestions on what to call it. I thought maybe I'll call it AOJParse or JParse, but they didn't seem quite right. Seemed rather dull to be honest. Anyway, if you've got any ideas let me know.
    Last edited by defender4; Jan 17th, 2008 at 22:01:08.

  2. #2

  3. #3
    Quote Originally Posted by defender4 View Post
    PS: If somebody knows a great guide on how to set up logging within AO, and/or how to find the Log.txt file, please post a link here. I know that several ppl have written good guides on how to do this. I just don't have any links to them handy.
    Setting up logging inside AO:

    Hit Shift+C to open the Chat Config Panel.
    Right click on your logging chat window, click "Log Messages".

    Finding the logfile:

    There's 2 methods:

    1) Go to Chat Config, right click on the logging chat window, click "View Log Window", then copy/paste the path it displays

    2) Go to your Anarchy Online\Prefs\<account name>\Char<character id (from Shift+F9)>\Chat\Windows\<window number>\Log.txt file. The <arguements> should be self explanatory (my path might be a bit off, it might be Chat\Window<window number>\Log.txt instead).
    General of Umojan Protectorate - Technical Department
    General of Haven - Technical Department
    Norbal, 220/19 MP - "Slightly" off-kilter NM - equip
    Norbby, 220/20 Keeper - stabbing anything that moves

    Quote Originally Posted by jorricane View Post
    And all MPs should be forced to speak like that Architect guy from the Matrix when RP'ing....
    I bump this daily, drop by and say hi?

  4. #4

    Various Updates

    I just finished a few of the things on my todo list. The new version + source code is uploaded and available.

    Changed:
    - I realized I forgot to close all the output files, when the program finished. It is fixed it now.
    - As far as I know the timestamps are correct. I haven't fully tested whether or not they are correct in terms of Daylight Savings Time.
    - I split the output files into one file per day, with the date as part of the filename.
    - I added seconds to the timestamps.
    - I changed the way the timestamps are output so that now its always 2 digit hour, 2 digit minute, 2 digit second.
    - There is no longer a ": " at the beginning of the lines that came from an anonymous sender.
    - The parser now splits the tell messages into one file per person you talked to (both the messages you sent and the messages they sent are parsed =D ).

    PS: I tested the parser with an 11 megabyte log file and it parsed the entire file within approximately 10 seconds.
    Last edited by defender4; Jan 17th, 2008 at 22:00:06.

  5. #5

  6. #6

  7. #7
    Using this now. I really don't like the way that shouts are turned into the same level of chat as normal vicinity. Otherwise I love it so far. Thanks.
    Theonara: "...but if I weren't married, some days I'd offer to kiss you. You just make too much sense. "
    Maeventura: "Sigh, once again I can but only bow for hyde's wisdom."

    ...."Social" keys, lightbars, wen-wens......Better tabbing!

    ... First Troxdoc with QL300 symbs (AO 17.0 pre-Albtraum guide) ... as well as first with 12 of 13 Alpha symbs.
    ... First TL1 Clanner with Omni-Armed Forces armor (pics) (pointless yet hawt)


    <original UI hacker ... when not actively playing AO ... email = 'hyde [at] athenpaladins • org'>

  8. #8
    Hi all, I tried to look for chatlog parser, seems there aren't too many out there.

    When I try this one, I get:

    java AOChatLogParser.jar

    Exception in thread "main" java.lang.NoClassDefFoundError: AOChatLogPars
    Caused by: java.lang.ClassNotFoundException: AOChatLogParser.jar
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: AOChatLogParser.jar. Program will exit.

    I am on Windows 7 and my java version is 6 (update 24).
    General of The Red Brotherhood
    TRB Videos Our Videos

  9. #9
    wow, 2 year necro...
    *sprinkles holy water*
    "When life knocks you on your butt, you have to get back up and punch it in the face." --DJ Ashval of GSP

    Nullified "Bitbucket" Deadcode - 220/25 Neut NanoMage Engi
    Bits10 - 150/14 Clan Opifex Trader

  10. #10
    Hehe

    I know that was an old thread, but still valid guestion.
    Not too many ways to read easily the chat log.

    I think only easy way is to do copy/paste using the games own chatlog viewer.
    General of The Red Brotherhood
    TRB Videos Our Videos

  11. #11
    I think they changed the way java interprets command-line arguments. Try running it as
    Code:
    java -jar AOChatLogParser.jar
    "Still, I was fabulous, and it was a bloody good laugh"

    BUREAUCRASHCOLDCOMFORTFONEBONE
    KISSNMAKEUPCASHORCHEQUEJELLYFUNK

  12. #12
    Thank you, that one worked.

    You are my hero
    General of The Red Brotherhood
    TRB Videos Our Videos

  13. #13
    Anyone have any idea why this might be cutting off messages that were near the beginning of conversations, and then random messages in the middle of conversations?

    It's rather annoying to see that I logged only half of something, but I'm not sure what's going wrong.
    Paratrooper (aka tarapooper/P-Rex) -> 220/30/70 Soldier

    Satyavati -> 150/7/39 Adventurer

    Politie -> 208/20/57 Bureaucrat

  14. #14
    Quote Originally Posted by avo345 View Post
    Anyone have any idea why this might be cutting off messages that were near the beginning of conversations, and then random messages in the middle of conversations?
    No idea if you don't post the relevant sections of the original log file.


    (Sidenote: Legally it would not be ok to change a bug and re-publish the program and/or source. But as this parser is so simple I think it would be fine to re-publish it under the GPL or even put it it the public domain. Xyphos already sprinkled holy water so everything will be fine. )
    Last edited by alfora; May 17th, 2011 at 07:46:49.
    First small fat Engi on RK1 who danced ballet in Red Twil Thigh High Boots in front of an Advy and got pronounced to greatness almost instantly.


    Afreng (220/30/70 engineer) Alfora
    Keepitsimple Exploratia Malpora Osmosa Tunneleffect Eccegratia Littleboy

    Quote Originally Posted by Kintaii View Post
    Or, well, that's how it's supposed to work. ;P

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •