Skip to content

send_message

send_message writes a text in the log of AnyWave. The messages appear in the debug log (View > Debug logs, tag Process::<name of your plugin>): it is the best way to follow what a plugin does.

import sys
import anywave as aw

aw.init(sys.argv)

aw.send_message('Hello AnyWave')
aw.send_message('%d channels, %.1f s of data' % (3, 10))
  • The message is a str.
  • print() does the same: what your script prints goes to the same log, line by line.
print('Hello again')

Report errors

try:
    out = aw.get_data(cfg)
except Exception as e:
    aw.send_message('get_data failed: ' + str(e))
    raise

See the log of a plugin for what it looks like.