ragged-rigid
ragged-rigid
ragged-rigid
ragged-rigid
Ruby On Rails: Writing something to the log. @ www.digitalpains.net

Ruby On Rails: Writing something to the log.

Ruby on Rails has build in features for writing to you application log file. You can directly use the logger object for this purpose.

Following line when it is executed will print “Hello world” to you log file.

logger.info 'Hello world'

You can use different log levels fatal, error, warn, info, debug .

logger.error 'Hello world'

For more information please check the documentation of Logger class.

Related posts:

  1. Ruby on Rails Internationalization
  2. Installing Ruby On Rails on Ubuntu
  3. A Mock SMTP server for rails developers

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

 
site-map research
 
profile