[REL] rFactor2 Log Analyzer ver. 2. With offline and league Championship Manager

Discussion in 'Other' started by Nibo, Apr 15, 2015.

  1. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    Try this, at http://your-r2la-address:port/report/get_report_jsonp
    Code:
    $.ajax({
        url: 'http://your-r2la-address:port/report/get_report_jsonp',
        type: 'GET',
        dataType: 'jsonp',
        crossDomain: true,
        data: {'file_name': '2020_06_27_08_16_10-54R1.xml'},
        success: function (data, textStatus, xhr) {
            console.log(data);
        },
        error: function (xhr, textStatus, errorThrown) {
            console.log(errorThrown);
        }
    });
    Its not raw xml, but already computed r2la data.
     
    DanRZ likes this.
  2. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
  3. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    It can only be used from JavaScript code, as shown in an example. Can you run JavaScript in your discord bot? (I don't know how dicord bots work...). If you can not run JS, then I will try to make a separate link available, that outputs xml.
     
  4. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    I will ask a friend who knows that better,
    I see the name of the file in the parameters ... But i don't know the name of the file in advance.
    That can be done automaticall "as is".

    Maybe i will use some kind of ftp ulpoad to send the "last" xml file to a shared space
    and call the discord bot on update. Much easier and disconnected from r2la ...

    Having an API from r2la woul be great, but it is probably not easy to implement.

    Thanks.
     
  5. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    Updated to 2.1.012

    I've decided to stop accepting donations from now on. That does not mean that I will drop r2la. I will still provide support for r2la as long as I can (as I did during last years). Thank you everyone who supported r2la development, your donations really helped me.
     
  6. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    Thanks for that update and for all of your work on r2la.
     
  7. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    The new urls work well, thanks. It would be cool to have a "raw" file and not the content but it's fine.

    Also, today i noticed a bug : The "Show records only after date:" doesn't seem to work anymore ...
    I'm pretty sure it worked before at some point.
     
  8. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    It works for me. Are you sure that you check the "Show records only after date" checkbox and press "Submit" button in form on Options page?
     
  9. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    Yes, just before i click on Submit ...

    Capture.JPG
     
  10. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    And what do you see on Records page? Records from dates earlier than 2022-11-01? Is there some error message in cmd window after you press submit on Options page?
     
  11. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    I have no errors and still all my results ...
    What do you mean by "cmd window" ?
     
  12. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    This window:
    cmd.jpg
     
  13. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    I don't have this window, i run r2la as a service ...
    I use this command :
    Code:
    web2py.exe -i A.B.C.D -p 1234 -a xxxxx --no_gui
    Maybe there is a log or i need to add something to get the log ?
     
  14. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    There is no log for this types of errors. You can try to start another instance of r2la (maybe on your local machine?), and start it by r2la.bat, then you'll see that window and possible error when you press "submit" on Options page. But I'm not sure there will be error message at all, maybe there is some silent bug...
     
  15. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    At some point i had stdout.txt and stderr.txt files...
    There is probably a way to send console logs to a file that i removed.
    Or i will try to launch r2la manually just to test ...

    EDIT : I launched it with a .bat and with the console, and nothing gets logged when i click "Submit ...".
    Still not working ...
     
    Last edited: Nov 18, 2022
  16. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    Sorry for the spam but i found how to redirect logs. In NSSM i can setup the service to log out on a file ...

    Capture.JPG

    But still nothing appears in logs when i submit a date to filter ... and it didn't work.
     
    Last edited: Nov 18, 2022
  17. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    Unfortunately, I can not reproduce "Show records only after date" not working in both Dedi and non-Dedi versions. Does anybody else have problems with this?
     
  18. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    Not a real issue, i can move or delete files ... just a bit annoying ...
    And i know it worked at some point ...

    Do you use "sytem file" date or "name file" date ?

    My files can be modified and show another date in Windows that can break r2la.
    Maybe it is something like that ...

    EDIT : I just checked and they still have the good date on Windows :
    2022_04_30_00_12_41-78P1.xml > Modfied 2022/04/30 ...
     
  19. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,264
    Likes Received:
    981
    Content of a tag "TimeString" from xml is used to check if log file is out of date range in this case.
     
  20. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    722
    Likes Received:
    222
    I checked all the files for that tag and they all have it properly.

    They all have two TimeString written.

    One in <RaceResults> block :
    <TimeString>2022/07/09 18:58:39</TimeString>

    and the other in <TestDay> block :
    <TimeString>2022/07/09 18:58:40</TimeString>

    When i set 2022/11/01 it says "Enter date as 1963-08-28" ...

    And when i submit a good date it re-reads all files and says "198 new files" in a popup, so the submit worked.
     
    Last edited: Nov 20, 2022

Share This Page