Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: DuMees on November 14, 2020, 05:50:09 AM

Title: Log File
Post by: DuMees on November 14, 2020, 05:50:09 AM
Hi All,

I'm creating a ServoStik plugin (works based on SetServoStik). Is there a way to see the log file from a running plugin?

Now I have no way of telling why it is not working (maybe a typo, etc).

Any help would be appreciated.
Title: Re: Log File
Post by: DuMees on November 14, 2020, 05:51:03 AM
On Linux that is.
Title: Re: Log File
Post by: mahuti on November 14, 2020, 07:52:17 AM
I usually launch AM from a remote terminal using

Quote
attract --loglevel debug

That gives me in-the-moment feedback.
Title: Re: Log File
Post by: keilmillerjr on November 17, 2020, 10:08:20 AM
Redirect standard output and error to file. Read file with plugin.

- or - switch to your terminal like muhati suggested. Your creating an issue where there isn't.
Title: Re: Log File
Post by: DuMees on November 17, 2020, 11:24:00 PM
Thanks for your reply.

As stated, I'm searching for help. I thought that's what's this forum is for. Not everyone is skilled in Linux and some actually want to learn. Checking up to page 10 and using the search function, if others asked the same question didn't bring anything up.

If you perceive it as me creating a new issue, perhaps you shouldn't be involved as moderator in a FORUM ;)

Anyway, I've completed the plugin. I've created a post and attached it in the gallery for others to use.

I did encountered some weird behavior outputting to a file where the "to game transition" errors are not logged. I couldn't find anything on the documentation other than something about local variables not behaving well or something. Is probably a known thing among skilled Attract mode ppl, but I don't want to create a new issue :D
Title: Re: Log File
Post by: keilmillerjr on November 18, 2020, 09:55:44 AM
The same exact method I mentioned applies to linux as well as windows.

The "issue" I was referring to is related to your original question "Is there a way to see the log file from a running plugin?" It is not an issue. You can view the log as previously mentioned. You should inquire further about that.

Your attitude is the exact reason why I have recently distanced myself. I have already created a multi platform and multi brand joystick plugin. I find no reason to merge with main branch when I receive crap.
Title: Re: Log File
Post by: mahuti on November 18, 2020, 11:23:00 AM
I think  we are getting off on the wrong foot here.  ;D Let's move on from stuff unrelated to the question if possible.

Just FYI there is a Linux app for lighting called LEDSpicer that also handles automation of joysticks and LEDs on Linux. I have it set up for U360s, GGG hardware, servosticks, etc.

I'll take a look at your plug-in. Thanks for posting it. I'm always excited to see more linux contributions

FYI, this is the method for saving a log and also outputting it to console:

attract --loglevel debug 2>&1 | tee ~/.attract/log.txt

That generates a lot of detail, so probably not a good thing to put in autostart.sh