cologger 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README.md +7 -6
  2. data/lib/cologger.rb +2 -3
  3. metadata +1 -17
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  ## Installation
5
5
  This utils is packed as a gem, so, simply run `gem install cologger` to install it.
6
6
 
7
- Current version is 0.1.1
7
+ Current version is 0.1.2
8
8
 
9
9
  ## Usage
10
10
  Using cologger is quite easy && straight forward.
@@ -24,11 +24,11 @@ logger.log_level = Cologger.LEVEL_DEBUG
24
24
  After that, you can start logging. For example,
25
25
 
26
26
  ```
27
- logger.fatal "universe", "the world is crashing"
28
- logger.error "brain", "what is going on here?"
29
- logger.warn "road", "watch your step sir"
30
- logger.info "FYI", "the big bang theory is funny"
31
- logger.debug "program", "anything still working?"
27
+ logger.fatal "the world is crashing"
28
+ logger.error "what is going on here?"
29
+ logger.warn "watch your step sir"
30
+ logger.info "[FYI] the big bang theory is funny"
31
+ logger.debug "anything still working?"
32
32
  ```
33
33
 
34
34
  And, here's what you got:
@@ -62,5 +62,6 @@ This gem depends on the cute [`colored' gem](https://github.com/defunkt/colored)
62
62
  Thanks sir!
63
63
 
64
64
  ## Change log
65
+ - 0.1.2, remove `tag` according to [@zhf](https://github.com/zhf)'s advice. User can add tag to content by themself when needed.
65
66
  - 0.1.1, use `\t` to align timestamp.
66
67
  - 0.1.0, initial version.
data/lib/cologger.rb CHANGED
@@ -64,11 +64,10 @@ class Cologger
64
64
 
65
65
  return unless level <= @log_level
66
66
 
67
- tag, *content_array = args
68
- content = content_array.join(" ")
67
+ content = args.join(" ")
69
68
  log = "#{sym_for method}\t"
70
69
  log += "[#{DateTime.now.iso8601}] "
71
- log += "[#{tag}] #{content}"
70
+ log += "#{content}"
72
71
 
73
72
  puts log.send(color) # TODO fixme!
74
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cologger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,22 +11,6 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2013-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: colored
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '1.2'
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: '1.2'
30
14
  - !ruby/object:Gem::Dependency
31
15
  name: colored
32
16
  requirement: !ruby/object:Gem::Requirement