ougai 2.0.0 → 2.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e289dc71320f34d59d1ed29ec87fe87778ac22eec628d627116264c8abdcd403
4
- data.tar.gz: 3f0d074e2ad4ed429a1c2988034811e94b2ef116a1f13611f7d5949a21af56d9
3
+ metadata.gz: b7960bbde8ec8ae6408bd7c151d5d01f55f7710c20256a2f0b0d8d32450f8fd7
4
+ data.tar.gz: 49a458b9cae86420a038f8f17ca835f6de8680f3fdf2e868aa46607b7939e0ab
5
5
  SHA512:
6
- metadata.gz: 101691c8885df5575d64e603f2e39922a0c0078f50a0685a470de561e5d2db3b01301b8b88eb0e54b23fea86006e02baebd98d2b7c701e9c5876b8df1417c3a7
7
- data.tar.gz: 3e807cafc0787b005312c527abbddd8bc4ae3834242d1adb3b1fa9b2deb0aebebd363ca1e46c7b120b31794b578c3d68c2bb292a31ce08be0a47edcc192ab5f4
6
+ metadata.gz: e082c22775e3ad0a08de9faf6ba563735c12761ba7fc72ab5da6dc10263533c522a76543dd017ab35ad3420f69ac16940298d8dc335607adb7701340f42c0c2e
7
+ data.tar.gz: 33687bb680f760e2329630acbacea15a6b5931776bdc26952ef0eec09959e161a938ba2444d49e5d76e289a7ae11bdd6fdc971a0f9945aae51fff5a413c216dc
data/Gemfile CHANGED
@@ -5,6 +5,8 @@ gemspec
5
5
 
6
6
  group :test do
7
7
  gem 'amazing_print'
8
+ gem 'rake', '~> 13.2'
9
+ gem 'rspec', '~> 3.13'
8
10
  gem 'simplecov', '< 0.18', require: false
9
11
  gem 'timecop'
10
12
  gem 'yard'
data/Gemfile.lock CHANGED
@@ -1,53 +1,56 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ougai (2.0.0)
5
- oj (~> 3.10)
4
+ ougai (2.1.0)
5
+ logger (~> 1.5)
6
+ oj (~> 3.17)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- amazing_print (1.0.0)
11
- diff-lcs (1.3)
12
- docile (1.3.2)
13
- json (2.3.0)
14
- json (2.3.0-java)
15
- oj (3.10.6)
16
- rake (13.0.1)
17
- rspec (3.9.0)
18
- rspec-core (~> 3.9.0)
19
- rspec-expectations (~> 3.9.0)
20
- rspec-mocks (~> 3.9.0)
21
- rspec-core (3.9.1)
22
- rspec-support (~> 3.9.1)
23
- rspec-expectations (3.9.0)
11
+ amazing_print (2.0.0)
12
+ bigdecimal (4.1.2)
13
+ diff-lcs (1.6.2)
14
+ docile (1.4.1)
15
+ json (2.20.0)
16
+ logger (1.7.0)
17
+ oj (3.17.3)
18
+ bigdecimal (>= 3.0)
19
+ ostruct (>= 0.2)
20
+ ostruct (0.6.3)
21
+ rake (13.4.2)
22
+ rspec (3.13.2)
23
+ rspec-core (~> 3.13.0)
24
+ rspec-expectations (~> 3.13.0)
25
+ rspec-mocks (~> 3.13.0)
26
+ rspec-core (3.13.6)
27
+ rspec-support (~> 3.13.0)
28
+ rspec-expectations (3.13.5)
24
29
  diff-lcs (>= 1.2.0, < 2.0)
25
- rspec-support (~> 3.9.0)
26
- rspec-mocks (3.9.1)
30
+ rspec-support (~> 3.13.0)
31
+ rspec-mocks (3.13.8)
27
32
  diff-lcs (>= 1.2.0, < 2.0)
28
- rspec-support (~> 3.9.0)
29
- rspec-support (3.9.2)
33
+ rspec-support (~> 3.13.0)
34
+ rspec-support (3.13.7)
30
35
  simplecov (0.17.1)
31
36
  docile (~> 1.1)
32
37
  json (>= 1.8, < 3)
33
38
  simplecov-html (~> 0.10.0)
34
39
  simplecov-html (0.10.2)
35
- timecop (0.9.1)
36
- yard (0.9.24)
40
+ timecop (0.9.11)
41
+ yard (0.9.44)
37
42
 
38
43
  PLATFORMS
39
- java
40
- ruby
44
+ x86_64-linux
41
45
 
42
46
  DEPENDENCIES
43
47
  amazing_print
44
- bundler (>= 2.1.4)
45
48
  ougai!
46
- rake (>= 13.0.1)
47
- rspec (>= 3.9.0)
49
+ rake (~> 13.2)
50
+ rspec (~> 3.13)
48
51
  simplecov (< 0.18)
49
52
  timecop
50
53
  yard
51
54
 
52
55
  BUNDLED WITH
53
- 2.1.4
56
+ 2.3.3
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016-2020 Toshimitsu Takahashi
3
+ Copyright (c) 2016-2026 Toshimitsu Takahashi
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,14 +2,12 @@ Ougai
2
2
  =====
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/ougai.svg)](https://badge.fury.io/rb/ougai)
5
- [![document](https://img.shields.io/badge/document-1.9.1-green.svg)](http://www.rubydoc.info/gems/ougai/)
6
- [![Build Status](https://travis-ci.org/tilfin/ougai.svg?branch=master)](https://travis-ci.org/tilfin/ougai)
7
- [![Code Climate](https://codeclimate.com/github/tilfin/ougai/badges/gpa.svg)](https://codeclimate.com/github/tilfin/ougai)
8
- [![Test Coverage](https://codeclimate.com/github/tilfin/ougai/badges/coverage.svg)](https://codeclimate.com/github/tilfin/ougai/coverage)
5
+ [![document](https://img.shields.io/badge/document-2.1.0-green.svg)](http://www.rubydoc.info/gems/ougai/)
6
+ [![CI](https://github.com/tilfin/ougai/actions/workflows/ci.yml/badge.svg)](https://github.com/tilfin/ougai/actions/workflows/ci.yml)
9
7
 
10
- A structured logging system is capable of handling a message, structured data or an exception easily.
11
- It has JSON formatters compatible with [Bunyan](https://github.com/trentm/node-bunyan) or [pino](https://github.com/pinojs/pino) for Node.js and
12
- human readable formatter with [Amazing Print](https://github.com/amazing-print/amazing_print) for console.
8
+ A structured logging system that is capable of handling a message, structured data, or an exception easily.
9
+ It has JSON formatters compatible with [Bunyan](https://github.com/trentm/node-bunyan) or [pino](https://github.com/pinojs/pino) for Node.js, and a
10
+ human-readable formatter with [Amazing Print](https://github.com/amazing-print/amazing_print) for the console.
13
11
 
14
12
  ## Installation
15
13
 
@@ -33,14 +31,13 @@ $ gem install ougai
33
31
 
34
32
  ## Usage
35
33
 
36
- **Ougai::Logger** is sub-class of original [Logger](https://ruby-doc.org/stdlib-2.4.1/libdoc/logger/rdoc/Logger.html) in Ruby.
37
- All arguments of the `initialize` pass through itself to **::Logger**.
34
+ **Ougai::Logger** is a sub-class of the standard [Logger](https://ruby-doc.org/stdlib-2.4.1/libdoc/logger/rdoc/Logger.html) in Ruby.
35
+ All arguments of the `initialize` pass through to **::Logger**.
38
36
 
39
37
  ```ruby
40
- require 'rubygems'
41
38
  require 'ougai'
42
39
 
43
- logger = Ougai::Logger.new(STDOUT)
40
+ logger = Ougai::Logger.new($stdout)
44
41
  ```
45
42
 
46
43
  ### TRACE level
@@ -176,7 +173,7 @@ logger.fatal do
176
173
  end
177
174
  ```
178
175
 
179
- To specify more than one of a message, an exception and custom data, the block returns them as an array.
176
+ To specify more than one message, exception, and custom data, the block returns them as an array.
180
177
 
181
178
  ### Adding custom fields to all logs
182
179
 
@@ -357,7 +354,6 @@ gem 'amazing_print'
357
354
  Set *Ougai::Formatters::Readable* instance to `formatter` accessor
358
355
 
359
356
  ```ruby
360
- require 'rubygems'
361
357
  require 'ougai'
362
358
 
363
359
  logger = Ougai::Logger.new(STDOUT)
@@ -366,7 +362,7 @@ logger.formatter = Ougai::Formatters::Readable.new
366
362
 
367
363
  ### Screen result example
368
364
 
369
- ![Screen Shot](https://github.com/tilfin/ougai/blob/images/ougai_readable_format.png?raw=true)
365
+ ![Screen Shot](https://github.com/tilfin/ougai/blob/images/ougai_readable_format_2-1.png?raw=true)
370
366
 
371
367
 
372
368
  ## How to use with famous products, services and libraries
data/lib/ougai/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ougai
4
- VERSION = '2.0.0'
4
+ VERSION = '2.1.0'
5
5
  end
metadata CHANGED
@@ -1,71 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ougai
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshimitsu Takahashi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-21 00:00:00.000000000 Z
11
+ date: 2026-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: oj
14
+ name: logger
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.10'
19
+ version: '1.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.10'
26
+ version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.1.4
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 2.1.4
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 13.0.1
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 13.0.1
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
28
+ name: oj
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
- - - ">="
31
+ - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: 3.9.0
62
- type: :development
33
+ version: '3.17'
34
+ type: :runtime
63
35
  prerelease: false
64
36
  version_requirements: !ruby/object:Gem::Requirement
65
37
  requirements:
66
- - - ">="
38
+ - - "~>"
67
39
  - !ruby/object:Gem::Version
68
- version: 3.9.0
40
+ version: '3.17'
69
41
  description: |2
70
42
  A structured logging system is capable of handling a message, custom data or an exception easily.
71
43
  It has JSON formatters compatible with Bunyan or pino for Node.js and human readable formatter with Amazing Print for console.
@@ -93,20 +65,11 @@ files:
93
65
  - lib/ougai/serializers/json_jr_jackson.rb
94
66
  - lib/ougai/serializers/json_oj.rb
95
67
  - lib/ougai/version.rb
96
- - spec/child_logger_spec.rb
97
- - spec/formatters/base_spec.rb
98
- - spec/formatters/bunyan_spec.rb
99
- - spec/formatters/pino_spec.rb
100
- - spec/formatters/readable_spec.rb
101
- - spec/logger_spec.rb
102
- - spec/logging_spec.rb
103
- - spec/ougai_spec.rb
104
- - spec/spec_helper.rb
105
68
  homepage: https://github.com/tilfin/ougai
106
69
  licenses:
107
70
  - MIT
108
71
  metadata: {}
109
- post_install_message:
72
+ post_install_message:
110
73
  rdoc_options: []
111
74
  require_paths:
112
75
  - lib
@@ -114,25 +77,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
77
  requirements:
115
78
  - - ">="
116
79
  - !ruby/object:Gem::Version
117
- version: 2.5.0
80
+ version: 3.1.0
118
81
  required_rubygems_version: !ruby/object:Gem::Requirement
119
82
  requirements:
120
83
  - - ">="
121
84
  - !ruby/object:Gem::Version
122
85
  version: '0'
123
86
  requirements: []
124
- rubygems_version: 3.1.2
125
- signing_key:
87
+ rubygems_version: 3.3.3
88
+ signing_key:
126
89
  specification_version: 4
127
90
  summary: JSON logger compatible with node-bunyan or pino is capable of handling structured
128
91
  data easily.
129
- test_files:
130
- - spec/child_logger_spec.rb
131
- - spec/logging_spec.rb
132
- - spec/ougai_spec.rb
133
- - spec/spec_helper.rb
134
- - spec/formatters/pino_spec.rb
135
- - spec/formatters/readable_spec.rb
136
- - spec/formatters/base_spec.rb
137
- - spec/formatters/bunyan_spec.rb
138
- - spec/logger_spec.rb
92
+ test_files: []