       account.totals.withdrawn -= amount
     account.transactions++
     @saveAccount account
-    @robot.logger.info "#{amount} :coffee:s #{if amount > 0 then 'deposited to' else 'withdrawn from'} #{client.name} (#{client.id})"
+
+    txType = if amount > 0 then 'deposited to' else 'withdrawn from'
+
+    @robot.logger.info "#{amount} :coffee:s #{txType} #{client.name} (#{client.id})"
 
   balance: (client) ->
     (@account client).balance

    @brain.userForId accountNumber

  accountFormatter: (account) ->
    "**#{@clientFormatter account.accountNumber}**: #{@balanceFormatter account.balance} (#{@accountDetailsFormatter account})"

  shortDateFormatter: (date) ->
    dateformat date, "mmm d yyyy h:MMtt"

# Description
#   A hubot script for announcing & claiming coffee
#
# Configuration:
#   HUBOT_COFFEE_DIBS_LIMIT Set the dibs limit (Default 6)
#   HUBOT_COFFEE_DIBS_DURATION Set the dibs time limit in seconds (Default 600 seconds (10 minutes))
#
# Commands:
#   hubot brewing - Start a new brewing lineup
#   hubot fresh pot - Announce that a pot is finished
#   hubot fp - Alias for: hubot fresh pot
