Skip to content

Instantly share code, notes, and snippets.

@miio
Created March 10, 2012 18:16
Show Gist options
  • Save miio/2012358 to your computer and use it in GitHub Desktop.
Save miio/2012358 to your computer and use it in GitHub Desktop.
ロガークラスのメモ
class Logger
###
# Loggingクラス
# Author : miio mitani <[email protected]>
# Package : Kwing.lib
# Licence : GNU Lesser General Public License v3 (http://www.gnu.org/licenses/)
###
debug : (attr_name, message) ->
###
# デバッグメッセージを出力
# ただしデバッグモードオフの時は何もしない
# TODO : miio デバッグモードは出力しないようにする
###
console.log "DebugInfo::#{attr_name}", message
error : (attr_name, message) ->
###
# エラーメッセージを出力
# リリースモードの時でも出力する
# TODO : miio エラーメッセージ時はそのまま例外を出す
###
console.log "Error::#{attr_name}", message
notice : (attr_name, message) ->
###
# 警告メッセージを出力
# リリースモードの時でも出力する
###
console.log "Notice::#{attr_name}", message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment