Simplify code api call syslog and option to send log to timeline

Finally got the simple syslog app working from within a script as follows

let sl = await Homey.apps.getApp({ id: ‘nl.nielsdeklerk.log/’ })
sl.apiPut(‘addlog’, {“log”: “Test 1,2,3 4,5,6”})

This has 2 lines of code, I think it could be in one line, but have not figured out how.
Any experienced api experts who know how to do this ?

Now the logging can be read in the syslog app, would it be possible to also log it to the timeline ?
Thanks Kind regards
Theo

Not sure what’s wrong with two lines, but this is a one-liner:

(await Homey.apps.getApp({ id: 'nl.nielsdeklerk.log/' })).apiPut('addlog', { 'log': 'Test 1,2,3 4,5,6'})
1 Like

Thanks works great

Can a @moderators merge this into the Simple (sys) log topic?

Im sure i can add this.
Can you create a ticket for it? Thanks!

Just did, thanks for the effort.

Would someone advise from beginning to end how to set all this up? I’d really appreciate it. I want to see all activity from all devices and flows in a central place

Hi Anthony & @Arie_J_Godschalk

Actually, these already exist (SimpleLogApp API for Homey-Developers) , I use them and it looks like this.

Unfortunately, I have been waiting for more than a year for some corrections in the Simple(Sys)Log app.

So far without success…:roll_eyes:

Chris