Skip to content

A simple but sophisticated logging utility that you can use to output messages

License

Notifications You must be signed in to change notification settings

katzer/mruby-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mruby-logger Build Status

Implementation of the Ruby 2.4.1 Standard Library Logger. A simple but sophisticated logging utility that you can use to output messages.

logger = Logger.new 'logs/development.log'

logger.formatter = -> (severity, datetime, progname, msg) do
  "[#{severity[0]}] #{datetime}: #{msg}\n"
end

logger.info 'hello world'
# => "[INFO] 2017-05-23 16:04:08 +0900: hello world"

Installation

Add the line below to your build_config.rb:

MRuby::Build.new do |conf|
  # ... (snip) ...
  conf.gem 'mruby-logger'
end

Or add this line to your aplication's mrbgem.rake:

MRuby::Gem::Specification.new('your-mrbgem') do |spec|
  # ... (snip) ...
  spec.add_dependency 'mruby-logger'
end

Development

Clone the repo:

$ git clone https://github.com/katzer/mruby-logger.git && cd mruby-logger/

Compile the source:

$ rake compile

Run the tests:

$ rake test

Authors

  • Sebastián Katzer, Fa. appPlant GmbH

License

The mgem is available as open source under the terms of the MIT License.

Made with 😋 in Leipzig

© 2017 appPlant GmbH

About

A simple but sophisticated logging utility that you can use to output messages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages