How to log from instrument code

Support for Air Player desktop.

Moderators: Ralph, russ

Posts: 177
Joined: Sun Feb 14, 2021 6:55 pm

Re: How to log from instrument code

#11 Post by Tetrachromat »

Oh, great idea to use inter-instrument communications. Yes that would make sense for that use case.

I just need one framework object that acts as a logger, publishing the received log messages to SI, which acts as message broker, and one instrument with the canvas as console, subscribing to the messages from SI. A bit elaborated but a most generic solution.

Hey you guys are great. Thanks a lot.


User avatar
Keith Baxter
Posts: 3767
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: How to log from instrument code

#12 Post by Keith Baxter »


Thinking about it. and I have not tried it.

Using inter instrument communication. if you subscribe to the dataref whatever is written to the dataref should be received in the subscribe. So if my understanding is correct it should be possible.

AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Posts: 4860
Joined: Mon Sep 11, 2017 2:37 pm

Re: How to log from instrument code

#13 Post by Sling »


Just seen this. You can indeed use iic to send messages. In fact you can use it as a way of creating a remote console. Probably don’t need to bother with tables unless you have a ton of data. Make yourself a remote console (rx) to run in AM and add the iic sends anywhere in your instruments (tx) you want to see output in the AM console. I’ve used this a couple of times to help understand a couple of multi instrument related issues during development. Remember to remove or comment out it all when you are done.


Post Reply