A widget can record its activity in several ways. Pick based on the audience for the message.
User-facing status — short, transient updates the user should notice. Use toast.
Ongoing activity the user will want to review. Implement a list of messages in the widget's own HTML. This is the right choice whenever the information is worth scrolling back through, rather than glancing at once and dismissing. For trading algos in particular, an in-widget activity log is often the right pattern: it complements the algo's control panel (parameters, Start/Stop buttons) with a running record of decisions and trades, all visible in one place. See the canonical widget skeleton in §1.1.1.
Developer diagnostics — debug output meant for you, not the user. Use the browser's standard
Note: the MyTrader platform does not currently have a centralised log or console of its own. This may change.