more G-Labs products

Author Topic: Live logging  (Read 640 times)

October 15, 2016, 12:17:38 PM
Read 640 times

raptorjr

  • ***
  • Information
  • Full Member
  • Posts: 78
Hi

I think it would be good with a Live log somewhere. Both a Live log for global events, the things in the log you can download. But also a log tab in the Program editor.

Now it feels like you have to do a lot of guessing when you develop a program. And the only output you can do is Program.Notify.
It would be nice if you had a new Tab in the Program editor, Console/Log or something, and in your code you could use Log.Print and that is shown in the Log tab. It would make it easier and faster to find your bugs.

October 17, 2016, 06:20:40 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
That would be helpful during the development cycle for sure!  I wrote a small code to write the log contents I needed to a text file.  This works, but a live logger might be a lot easier since on the RPi it requires an extra window being viewed or loading the text file over the network on the development machine.  I wouldn't say it's a critical item, but for a real development environment it's something I would expect to have access to.

October 18, 2016, 12:39:32 PM
Reply #2

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
if you use:

Program.Log.Trace("Sample trace message");
Program.Log.Debug("Sample debug message");
Program.Log.Info("Sample informational message");
Program.Log.Warn("Sample warning message");
Program.Log.Error("Sample error message");
Program.Log.Fatal("Sample fatal error message");

they will log to the homegenie log which you can tail -f or similar..