Author Topic: GetLog Plugin for UI5 and UI7 R1.2  (Read 5945 times)

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +68/-2
Re: GetLog Plugin for UI5 and UI7
« Reply #15 on: September 07, 2016, 07:03:59 pm »
What are you using as the Grep Pattern ?

The grep call is returning an error (non zero code) that is interpreted by Lua as 512.  Either it cannot handle the pattern or there are no results found..
I have not looked but my guess is that vera is using busybox to implement grep and that may be limiting the results.

If there is no pattern (blank) - what happens ?  The grep code is not called if the pattern is blank.  So it's not possible (unless I have cleverly disguised bug) to get this error in the version I posted.  If you think this is not the case - can you grab and post a copy of the log file where the GetLog plugin is being called.

Offline kevink619

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +0/-4
Re: GetLog Plugin for UI5 and UI7
« Reply #16 on: September 08, 2016, 12:19:04 am »
I finally got it to work. :)

Somehow some random characters were getting added to the grep pattern field. I cleared it out and now it works.

Thanks,

Kevin

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +68/-2
Added new release R1.1
« Reply #17 on: October 11, 2016, 01:03:27 pm »
This release adds the ability to delete the GetLog log file as well as any GCal3 log files.   When GCal3 is uninstalled / installed vera will create new device numbers.  This can leave old, unneeded log files in the directory.

Offline Andy

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +1/-0
Re: GetLog Plugin for UI5 and UI7 R1.1
« Reply #18 on: October 31, 2016, 06:11:06 am »
I can't get getlog to save a log file, have tried no text for the grep, and a couple of words I thought it should find (log and wave).

In the case of no text a file is created that can't be viewed or successfully downloaded. In the case of using thone words I get "Grep Error Code: 256".

A bit of googling suggests this might actually be a count returned by grepfile via grep.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +68/-2
Re: GetLog Plugin for UI5 and UI7 R1.2b
« Reply #19 on: October 31, 2016, 11:14:27 am »
Try this file - I definitely had a bug that was producing the 256 error.  As a side note - the codes returned by Lua are not the ones grep returns, so it's unfortunately not that helpful.  There is some translation going on that I have not had time to figure out.

When you try to read the log file you need to use "Download" and open in a text editor.  I've never had vera do anything much (other than some xml  complaint) with "view".  If the log file is large - I have found that it will sometimes appear to be blank if the file is in the process of downloading when you try to open it in an editor.  In which case, try "save" and see if it opens once the download is complete.

Edit:  I released this as V1.2 in the marketplace and revoked V1.1
« Last Edit: November 01, 2016, 10:24:59 am by Stuart »

Offline korttoma

  • Hero Member
  • *****
  • Posts: 688
  • Karma: +25/-5
  • Keep it simple, stupid
Re: GetLog Plugin for UI5 and UI7 R1.2
« Reply #20 on: January 09, 2018, 03:45:16 am »
Have not used this plugin for a while but today I tried to create a Log and found that it log file is not generated.
Does this plugin still work in 7.0.24 firmware?
- Tomas

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +68/-2
Re: GetLog Plugin for UI5 and UI7 R1.2
« Reply #21 on: January 09, 2018, 12:53:29 pm »
Hi Thomas --

I just tried and got similar errors.  It seems something has changed (again) at the vera level.  I tried an alternate syntax for formulating the grep search and it seems to work. My guess is that busybox (from memory that's what's used in the OS as a command interpreter) has changed or the way vera pass commands to the OS.

Try this - it's a one-line change - and see if it works on your system.


Offline korttoma

  • Hero Member
  • *****
  • Posts: 688
  • Karma: +25/-5
  • Keep it simple, stupid
Re: GetLog Plugin for UI5 and UI7 R1.2
« Reply #22 on: January 11, 2018, 03:40:27 am »
I noticed that it showed version 1.1 for GetLog Plugin even if I uploaded the new files you posted so I decided to uninstal the PluGin and reinstall from Marketplace. After reinstall it seems to be working correctly (version 1.2) again even if I did not add any of the files you posted here.
- Tomas

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +68/-2
Re: GetLog Plugin for UI5 and UI7 R1.2
« Reply #23 on: January 11, 2018, 11:13:19 am »
My bad - I uploaded the wrong file.   Try this one (should log as 1.3) as it's possibly less sensitive to the different OS versions used in Vera.