# How to send log messages

The logs of the script make up a great way to debug a developed groovy script.

In order to log messages, the developer must call the methods info and error of the log instance:

log.info("this is an info log")
log.error("this is an error message")

# How to see the logs for debugging

In order to see the output of the logs, the user must enter the remote server by ssh, and then execute the im-log command:

ssh <server_name>.cultofbits.com
im-log

After executing im-log, the developer will see the logs of all the scripts, now the developer need to find the messages of the relevant scripts only. In order to be able to move up and down with the keyboard keys or with the mouse scroller, the developer must press ctrl + c to enter the interactive mode. In this mode, the developer will not be able to see the new messages. To exit the interactive mode, the developer must press q keyword.