Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » where are log files - again

Pages: [1] 2
Author Topic: where are log files - again
RayR46
Member
Posts: 3
Post where are log files - again
on: November 16, 2021 (GMT)

Hi, new user and I realise this is a much discussed topic but I am failing!

I did a trip a few weeks ago and after searching the forum found the data file eventually on my Samsung tablet after unhiding all system files – all good and can use data.

I did another trip today and logged as before but cannot find the file. There is a file on the tablet because if I select Map View it lets me pick the trip I did today. If I select it the map zooms correctly, and the limits of the different data sources appears correctly for each data set. So it appears there is a file but I cannot find it.

Any suggestions?

Ray

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: November 17, 2021 (GMT)

Hi!

First, make sure you’re not on the beta version – The beta version is a work in progress and is currently in the progress of changing the location of the files (there are also a couple of bugs in the beta version, which is why it’s beta)

The log files are stored on the sdcard in a folder called ‘torqueLogs’ – it should be visible with any file manager

RayR46
Member
Posts: 3
Post Re: where are log files - again
on: November 17, 2021 (GMT)

Hi and thanks for the reply.

I am sorry this is such a problem but still no luck. I will try and answer your points below.
There is no indication of Beta version but I cannot find a version number.
My Torque files are on the internal storage not the SD card.
The torqueLogs folder is at first level on Internal storage but is empty.
I have a .torque folder at first level on Internal storage and this contains a tripLogs folder which contains my first log from 26th Oct. but not the latest on 17 Nov.

I have tried to insert an image of the Map View with the 2 different trips but have made it work.

I appreciate if you can help on this.

Ray

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: November 18, 2021 (GMT)

Hi!

I’ll make some changes in the next beta update (that fixes a few other issues) and get that out in the next few days (possibly monday as my household has just tested positive)

The storage location in the update will be Documents/torqueLogs on the device storage (whether that be SD card or internal depending on how your phone manufacturer has it setup)

Which android version are you using?

RayR46
Member
Posts: 3
Post Re: where are log files - again
on: November 19, 2021 (GMT)

Hi Thanks again for the reply.

Hope you all get through Covid OK.

My Samsung tablet is on Android version 11 and UI 3.1

Also found the Torque version which is 1.10.134

Ray

Terrox
Member
Posts: 13
Post Re: where are log files - again
on: November 29, 2021 (GMT)

Hello,

I have recently updated to the latest version of Torque Pro (Beta) and I cannot locate the log files either. I have looked under the root directory of my phone, within the .torque folder, there is no torqueLogs folder within the Documents folder, and the same goes for both my phone’s internal storage and SD card. I have verified that the application is set to log data to a .CSV file. I am on a Note 10+ running Android 11.

Thank you.

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: November 30, 2021 (GMT)

Hi!

Because of issues attempting to store the files inside the Documents folder, I’ve had to abandon that and instead store them inside the apps external private data area – this is in:

(on most samsungs)
/sdcard/Android/org.prowl.torque/data/{torqueLogs|tripLogs}

You can always send the files to places like google drive from within the app (press the 3 dots, and hit the share/email link which will enable you to export the log).

I’m currently working on the desktop sync app which will basically allow you to easily sync the logfiles to your computer (automatically) as well as another potential provider in android to give access the the files. Most of this is because Google are now enforcing the scoped storage use via minimum API levels

Terrox
Member
Posts: 13
Post Re: where are log files - again
on: November 30, 2021 (GMT)

Hey,

Thanks for the update. I was able to find the tracklog.csv file on my phone at Android/Data/org.prowl.torque/files/torqueLogs. The only problem now is that Tasker is now unable to read the .csv file at this directory. :(

I’ll see if there is a fix or a file transfer to another directory workaround that I can come up with in the meantime.

CaptainMarci
Member
Posts: 4
Post Re: where are log files - again
on: December 3, 2021 (GMT)

Quote from Terrox on November 30, 2021
Hey,

Thanks for the update. I was able to find the tracklog.csv file on my phone at Android/Data/org.prowl.torque/files/torqueLogs. The only problem now is that Tasker is now unable to read the .csv file at this directory. :(

I’ll see if there is a fix or a file transfer to another directory workaround that I can come up with in the meantime.

I have the exact same issue and because the webupload to my server isn’t working either, there is currently no way to automatically get the data into my home automation system. I hope this gets fixed soon. :(

Terrox
Member
Posts: 13
Post Re: where are log files - again
on: December 5, 2021 (GMT)

I had a small workaround where I was able to upload the original file from the internal folder to Dropbox, and then to a documents folder on my SD card. It didn’t work well but it was better than nothing. I just noticed now that the app was updated today and now dual syncs to log files to both locations automatically. Huge thank you for the update!! I’ll test it in my car later today and update Tasker accordingly.

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: December 5, 2021 (GMT)

Hi!

No problem – thats pretty much the best I can do for the file logging…

I checked the web server stuff over and it is working here, and on a couple of other boxes on the ‘net not part of my normal testing stuff, so far I can’t see anything wrong. I did take the time to add proper SSL support though (which also got tested, works :-)) that’s in the latest beta 1.10.150

Do you know the exact configuration you are using (or could email me the URL you are using so I can have a tinker sending requests to your server on monday and see if anything is up)?

Terrox
Member
Posts: 13
Post Re: where are log files - again
on: December 6, 2021 (GMT)

As of the latest update, the log files are writing to both:
/Android/Data/org.prowl.torque/files/torqueLogs/trackLog.csv
and
/Documents/torqueLogs/trackLog.csv

A problem that is occurring now is the trackLog.csv file is creating new files upon each drive even though I have the setting to rotate Logfiles disabled. Multiple files are being created with the names:
trackLog(1).csv
trackLog(2).csv
trackLog(3).csv
etc…
trackLog.csv

I was hoping that the file would continuously write and add data to just tracklog.csv only. Any way this can be fixed?

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: December 6, 2021 (GMT)

Hi!

I’ll see if I can improve on this a little bit more – though if the app doesn’t have access to the file anymore (reinstall, another app created the file, or you copied it in manually) then *android* will create a ‘(2)’, etc named file even through I don’t specify that, due to the way scoped storage works… I may try to request permission for the file if that happens, but that might get annoying if the file permissions are constantly lost!

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: December 6, 2021 (GMT)

Hi!

I’ll see if I can improve on this a little bit more – though if the app doesn’t have access to the file anymore (reinstall, another app created the file, or you copied it in manually) then *android* will create a ‘(2)’, etc named file even through I don’t specify that, due to the way scoped storage works… I may try to request permission for the file if that happens, but that might get annoying if the file permissions are constantly lost!

Terrox
Member
Posts: 13
Post Re: where are log files - again
on: December 7, 2021 (GMT)

It seems that once the app opens, it creates multiple but blank trackLog.csv files immediately. The file with the highest (#) value has the newest data records when connected properly to my car. As an attempt to further troubleshoot the issue, I cleared the app cache, then data, and then I uninstalled and reinstalled Torque completely. The app with all default settings still creates multiple .csv files in the /Documents/torqueLogs/ directory, but only one .csv file in the /Android/Data/org.prowl.torque/files/torqueLogs/ directory. Hopefully this can be resolved.

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: December 7, 2021 (GMT)

Quick question – can tasker use DocumentProviders? (I could look but you probably already know the answer to this) – if it does I can probably make a document provider that would allow access to the files (kind of like the ‘google drive’ document provider)?

I have the problem partially worked-around and it is now appending to the file (the only issue is if you uninstall and reinstall the app, it looses access to the tracklog.csv file and starts the (1),(2), etc again which then just needs the file deleting so Torque can re-create it.

Terrox
Member
Posts: 13
Post Re: where are log files - again
on: December 8, 2021 (GMT)

To be completely honest, I’m unsure about the use of DocumentProviders but I’m assuming so? I have a task that when runs, it goes to the last line in the .csv file to set all the values to variables. It runs great and had no problems until Torque started creating multiple files as Tasker has to be set to only one specific file to read. Appending the same file would be great for my needs honestly. Tasker can read any file in the /Documents/ directory to please feel free to have the .csv file in that location. If the app needs any specific access, I’d gladly permit it. Hopefully, it doesn’t lose access too often. I also sync all the trackLog.csv file to my Desktop via Dropbox so I can read it and if the app starts the (1), (2), etc again, I can easily delete them quickly if necessary. Long story short, your workaround sounds great.

CaptainMarci
Member
Posts: 4
Post Re: where are log files - again
on: December 8, 2021 (GMT)

Quote from Terrox on December 8, 2021
To be completely honest, I’m unsure about the use of DocumentProviders but I’m assuming so? I have a task that when runs, it goes to the last line in the .csv file to set all the values to variables. It runs great and had no problems until Torque started creating multiple files as Tasker has to be set to only one specific file to read. Appending the same file would be great for my needs honestly. Tasker can read any file in the /Documents/ directory to please feel free to have the .csv file in that location. If the app needs any specific access, I’d gladly permit it. Hopefully, it doesn’t lose access too often. I also sync all the trackLog.csv file to my Desktop via Dropbox so I can read it and if the app starts the (1), (2), etc again, I can easily delete them quickly if necessary. Long story short, your workaround sounds great.

With the new update, i’m able to read the csv files again wirh tasker. Big thanks to the developer :)

To this specific post, i have set up tasker with a shell command, that reads the newest file and stores the values of the last line in the newest file to $result. Then you just need to store the output to a tasker variable, in my case its %AUTO_WERTE.

And this is my shell command code for tasker:

folder=/storage/emulated/0/documents/torqueLogs
cd $folder
newest_file=$(ls -Art | tail -n 1)
result=$(cat “$newest_file” | tail -n 1)
echo $result

Maybe this could be helpful for you as well :)

piemmm
Administrator
Posts: 6623
Post Re: where are log files - again
on: December 9, 2021 (GMT)

Hi!

Hoping to get the update out tomorrow or the day after (just a map alignment and snap-to alignment bugs/features to sort out). It’s back to the normal trackLog.csv behaviour where it appends, though if you uninstall and re-install the app you’ll need to delete that file so Torque can re-create it with the correct access again.

The desktop sync app will also allow you to transfer files from the device (once I’ve finished writing it) which can easily sync over wifi. It’s in java so it’ll run on windows/linux/macos easily enough. I could also add a command-line client eventually too (though not just yet as there’s a lot of other stuff I want to add to the app :-))

Terrox
Member
Posts: 13
Post Re: where are log files - again
on: December 9, 2021 (GMT)

Quote from CaptainMarci on December 8, 2021
With the new update, i’m able to read the csv files again with tasker. Big thanks to the developer :)

To this specific post, i have set up tasker with a shell command, that reads the newest file and stores the values of the last line in the newest file to $result. Then you just need to store the output to a tasker variable, in my case its %AUTO_WERTE.

And this is my shell command code for tasker:

folder=/storage/emulated/0/documents/torqueLogs
cd $folder
newest_file=$(ls -Art | tail -n 1)
result=$(cat “$newest_file” | tail -n 1)
echo $result

Maybe this could be helpful for you as well :)

I’m not too terribly familiar with running shell commands in Tasker, but I’m trying this now as it seems to be way less complicated than what I’m currently trying . I’ve copied your shell command verbatim to Tasker but unfortunately I’m getting the following error:

cat: “trackLog: No such file or directory
cat: (12).csv”: No such file or directory

I’ve verified that the folder path is correct, and trackLog(12).csv is the newest file in the folder. Strange that it gives this error saying that, but yet can still detect both the name and newest number.

hey again Piemmm,

Thank you for the latest update. If I can get this shell command to work or not, thank you for the soon to be released update. I’ll continue tinkering with and researching the shell command to see what I’m doing wrong.

Pages: [1] 2
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.067 seconds.

  Follow me on twitter