Skip to content

Conversation

@codeout
Copy link

@codeout codeout commented Mar 24, 2012

Updated methods below so that

debug('progname'){ 'message' }

can generate a syslog like

Mar 24 17:21:09 my_mac rails[17421]: [17:21:09.650780 ] [DEBUG]: message

instead of

Mar 24 17:21:09 my_mac rails[17421]: [17:21:09.650780 ] [DEBUG]: progname
  • unkown()
  • fatal()
  • error()
  • warn()
  • info()
  • debug()

According to API (eg: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html#method-i-debug)

'debug' looks like:

def debug(progname = nil, &block)
  add(DEBUG, nil, progname, &block)
end

not

def debug(message = nil, progname = nil, &block)
  add(DEBUG, message, progname, &block)
end

My changes are tested with ruby 1.8.7-p358, 1.9.2-p318 and 1.9.3-p125.

thanks

… class.

- unkown()
- fatal()
- error()
- warn()
- info()
- debug()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant