groonga-log 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e5760b5a5c27945a6f07959e7232ef365afc423
4
- data.tar.gz: 1d653394e6f75b28326290af218e4abd620992c5
3
+ metadata.gz: 1b1b31515ef1d36933fa60b2cb757781d306b03f
4
+ data.tar.gz: 6af04a58da72335c8256f7b7c329037088542108
5
5
  SHA512:
6
- metadata.gz: 3390b385703b14e31cb33d972b43b327b3fa57d8bdbcc69e2580ee0ce90e178a6250a54e5363032c8526b82889e50699750c3780bf81f9d47fa720a41692253f
7
- data.tar.gz: 5bfeb0af6f5c3cee534cdab7fbe1317ecc8b002ae6944c56e98ef5ecedb6d1362c09b2e0bf29757d03959b4df7e29ef59c7a94edf2e422daf1b0d3ecb0d97065
6
+ metadata.gz: eec6d9d2e88d62981c0d0435bf99f2de568306aa574e1640e9187f43c38bf9656b4fd868ed28c7841d38619f1d94de7caa69660debc9d5279f191c19e6a04b0b
7
+ data.tar.gz: c479b592f4ac6b6137b07e7e6073ef541f1a92db3e671a1123c1d41585ee4138cdff5dd1f4c9828373a9f69549e66d282864bb0ebf7b506a4c76cb951dab9694
@@ -34,13 +34,15 @@ module GroongaLog
34
34
  m = PATTERN.match(line)
35
35
 
36
36
  statistic = Statistic.new
37
- statistic.year = m['year'].to_i
38
- statistic.month = m['month'].to_i
39
- statistic.day = m['day'].to_i
40
- statistic.hour = m['hour'].to_i
41
- statistic.minute = m['minute'].to_i
42
- statistic.second = m['second'].to_i
43
- statistic.micro_second = m['micro_second'].to_i
37
+ year = m['year'].to_i
38
+ month = m['month'].to_i
39
+ day = m['day'].to_i
40
+ hour = m['hour'].to_i
41
+ minute = m['minute'].to_i
42
+ second = m['second'].to_i
43
+ micro_second = m['micro_second'].to_i
44
+ statistic.timestamp = Time.local(year, month, day,
45
+ hour, minute, second, micro_second)
44
46
  statistic.log_level = log_level_to_symbol(m['log_level'])
45
47
  statistic.context_id = m['context_id']
46
48
  statistic.message = m['message']
@@ -16,24 +16,8 @@
16
16
 
17
17
  module GroongaLog
18
18
  class Statistic < Struct.new(:timestamp,
19
- :year,
20
- :month,
21
- :day,
22
- :hour,
23
- :minute,
24
- :second,
25
- :micro_second,
26
19
  :log_level,
27
20
  :context_id,
28
21
  :message)
29
- def timestamp
30
- super || Time.local(year, month, day, hour, minute, second, micro_second)
31
- end
32
-
33
- def to_h
34
- hash = super
35
- hash[:timestamp] ||= timestamp
36
- hash
37
- end
38
22
  end
39
23
  end
@@ -1,3 +1,3 @@
1
1
  module GroongaLog
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Horimoto Yasuhiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.4.5
112
+ rubygems_version: 2.5.2
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Groonga-log is a collection of library and tools to process [Groonga](http://groonga.org/)'s