Tasker Reading Logcat file - locale plug-in command help! I nearly have no hair left..

304 views
Skip to first unread message

brandall76

unread,
Apr 10, 2011, 9:51:44 AM4/10/11
to Tasker
Very briefly, I'm setting Tasker up to review the logcat file when it
sets auto-sync to be on periodically. The aim of this is to control
the data connections and align the syncing of all data and preventing
other applications fetching data inbetween times or re-trying if the
initial attempt failed, with the ultimate goal of allowing the device
to deep sleep more....

Anyway, everything was going fine until I had to learn the locale plug-
in commands from the ground up and I'm really, really stuck.

Tasker is currently activating the data connection/autosync and at the
same time using locale to wipe the previous logcat records:

@! logcat -c

Then it sends the contents for the period that the data connection/
autosync is active to:

@! logal -f /sdcard/taskerlogcat.txt

That's great and working and I'll get Tasker to read this file BUT

My problem is that I cannot cancel the continuation of the logcat
being written to this file (ARRGGHH!) and it continues to log all
other actions, rather than just the specific auto-sync activity I
want! I've Google'd the hell out of this for the last 4 hours and have
to give up..... help me please!

A simple 'ctrl +c' command to kill the logcat writing this to
'taskerlogcat.txt' should be all that is required (from what I've
read) - but I cannot get the locale terminal to do this..... and I
very nearly have pulled out all of my hair.

In comparison to what I'm trying to do, this should be very simple,
surely...?

How do I stop the logcat writing to the
file.................................?

Massive thanks in advance.

brandall76

unread,
Apr 11, 2011, 1:42:50 PM4/11/11
to Tasker
Should anyone ever suffer this problem in the future, I had to use a
work around.

Got Tasker the copy the logcat output file to another location.
Got Tasker to delete the original file.

Result - Was left with no original file for logcat to update and the
logcat snippet I required in the 'copied' location for Tasker to read
and split variables. Sorted.

I do have no hair now though.

Raul SC

unread,
Aug 1, 2017, 11:05:50 AM8/1/17
to Tasker
Six years later, thanks

Raul SC

unread,
Aug 2, 2017, 7:34:04 AM8/2/17
to Tasker
In case someone else is interested, I have an easier solution to stop the writing of logcat text.

Task A:

A1: Execute console [Command: logcat -c Countdown (seconds): 0 Use Root: Off Store Output On:% logcat Store Errors In: Store Result in:]

A2: Execute Console [Command: logcat -f /sdcard/taskerlogcat.txt Countdown (seconds): 0 Use Root: Off Store Output On:% logcat Store Errors In: Store Result in:]

Task B:

A1: Stop [Failed: Off Task: Task A

However, I do not know what happens to the logcat log run from Tasker, which does not give complete information.

When I run logcat from "emulator terminal" it gives much more information.

Reply all
Reply to author
Forward
0 new messages