 module.exports = (robot) ->
 
   unless process.env.HUBOT_VIRUSTOTAL_API?
-    robot.logger.warning 'The HUBOT_VIRUSTOTAL_API environment variable not set'
+    robot.logger.warning "#{modulename}: environment variable HUBOT_VIRUSTOTAL_API not set."
   else
     virustotal.setKey(process.env.HUBOT_VIRUSTOTAL_API)
 

  robot.respond /virustotal url (.+)$/i, (msg) ->
    url = msg.match[1]

    robot.logger.info "Virus total: url report request: #{url} [#{msg.envelope.user.name}]"

    return queueUrlReport robot, msg, url

  # robot.logger.info "sq: sending virustotal request for #{url}"
  virustotal.getUrlReport url, (err, res) ->
    if err
      msgout = "#{modulename}: error: `#{err.json.verbose_msg}`."
      robot.logger.info "#{msgout} [#{msg.envelope.user.name}]"
      return robot.send {room: msg.envelope.user.name}, msgout

