Will no longer send debug messages to listeners if debug is disabled.

Signed-off-by: Lucas Arnström <lucasarnstrom@gmail.com>