Print Block vs ShowAlert PopUp vs Real-Time Logging

I see the Print Block Used a lot. I read that,

The Print block shows up if you open the browser’s console.

I generally try to avoid opening the browser console.
image

But prefer to use the ShowAlert block which provides me with an instant PopUp of the exact data I need for debugging.
image

Though… Real-Time Logging looks like it may be an ideal compromise. Instead of using the ShowAlert PopUp message block, how might I send my debugging messages to the Real-Time Logging screen?
image

Hi Paul,

Real-Time logging is for Business Logic code (which is running with NodeJS on the server-side). This is for API Services, Timers, Event Handlers.
UI Builder is a client app and all log messages go directly to the browser’s console.

Regards,
Stanislaw

I’m sorry, I was wrong. I checked with my colleagues and my previous answer does not correspond to reality - in fact, all logs come to that window as well, but for the UI Builder this works only on a paid plan and on trial.

Good news! How might I send my debugging messages to the Real-Time Console?

They should appear there if you use the print block. If they’re not appear, please check Log-Level in the Management -> Log Management screen. Try to set it to INFO.

1 Like

The Log a Message Block works like a charm. Excellent for debugging.
Don’t forget to add the Flush log Message block. It won’t work otherwise.
image

Debug info shows up on The Real Time Logging window.
image

PS: Thanks again for your assistance on this @stanislaw.grin

1 Like

Hello @Townsend

Let me please correct your answer regarding flushing logs:

Actually, it will work, but not instantly because the JS-SDK accumulates logs and send them in a single API call.
I assume we should add this flushing “out of the box” when the app is running in the preview mode.
However, in the production, it will work in regular mode, once the pull of messages is full or the last message was added, for example, 5 seconds ago we flush the messages.
Does it make sense?

Regards, Vlad

Yes. Ordinarily the flushing of messages is an automatic process, (though slightly delayed). For debugging, if you need to see the message immediately, then use the flush block.

1 Like