Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
543 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# motion-logger | ||
|
||
A thin wrapper of CocoaLumberjack for RubyMotion. | ||
|
||
Status: Basic features working | ||
|
||
## Usage | ||
|
||
```ruby | ||
file_logger = DDFileLogger.new | ||
file_logger.rollingFrequency = 60 * 60 * 24 | ||
file_logger.logFileManager.maximumNumberOfLogFiles = 1 | ||
Log.addLogger file_logger | ||
|
||
tty_logger = DDTTYLogger.sharedInstance | ||
Log.addLogger tty_logger | ||
|
||
Log.level = :warn | ||
|
||
Log.info "Hello World" | ||
Log.warn "WARNING!" | ||
Log.debug "Lah" | ||
Log.flush | ||
``` | ||
|
||
## Setup | ||
|
||
Install the gem: | ||
|
||
``` | ||
gem install motion-logger | ||
``` | ||
|
||
Require the gem in Rakefile: | ||
|
||
``` | ||
require 'rubygems' | ||
require 'motion-logger' | ||
Motion::Project::App.setup do |app| | ||
app.name = 'MyApp' | ||
# Only needed if you are not already using pods | ||
app.pods do | ||
dependency 'CocoaLumberjack' | ||
end | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Motion | ||
module Logger | ||
VERSION = "0.1.0" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- encoding: utf-8 -*- | ||
require File.expand_path('../lib/bubble-wrap/version', __FILE__) | ||
|
||
Gem::Specification.new do |gem| | ||
gem.authors = ["Francis Chong"] | ||
gem.email = ["francis@ignition.hk"] | ||
gem.description = "A thin wrapper of CocoaLumberjack for RubyMotion." | ||
gem.summary = "A thin wrapper of CocoaLumberjack for RubyMotion." | ||
gem.homepage = "https://github.com/siuying/motion-logger" | ||
|
||
gem.files = `git ls-files`.split($\) | ||
gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) | ||
gem.name = "motion-logger" | ||
gem.require_paths = ["lib"] | ||
gem.version = BubbleWrap::VERSION | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.