json_ruby_logger 0.1.5 → 0.1.6

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: d54a10d53e83e69e49606a42420dea9540cfd30c078afe1a9b34b6ae2640380a
4
- data.tar.gz: 13b3b25e9bf946155f6ffcfacb57b07c9ae0926af755da273fd1647683f3b95f
3
+ metadata.gz: d1899a6af2f8634c3951c9fb20cabc731b17a47dc4520b87dab6f4ecc760aa4d
4
+ data.tar.gz: 8c8fba7b7e09373948a09576b65c7c794419cd1316a7d04af080105e94979e72
5
5
  SHA512:
6
- metadata.gz: e3b15e905b9fbfa963f1d822d1d583ba32649dc0c67a778b237ce557e90e7ce651bbe03e011aa3a52c3705c02412e73249c4bc3ea729fe33738a90f8c7179374
7
- data.tar.gz: 76593234c12c2fc24215dc722665e7a972e24eff331b3cecc90ad582594f1b02ded2b9edac7df313d857c18b52295e29d2b3ea422c2a7c5e1f4345195fe6c502
6
+ metadata.gz: c495fe7a1afc04b58e68e8669a5c269a647f22e4a7316df239bb6428df95e808fd7226dabc6e5bf93007d831cbecc27825de4cb47796b57edaccd16f06888378
7
+ data.tar.gz: 4a53553727ad33be74b84e424f5840f773af4b7011a488769fedf88321a3fd79def883fd2fcc1153a2cd4036472e258a22cb0cfceedf5e56a60e9d27900f4921
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # JsonRubyLogger
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/json_ruby_logger.svg)](https://badge.fury.io/rb/json_ruby_logger)
4
+
3
5
  A simpe ruby [logger](https://ruby-doc.org/3.2.2/stdlibs/logger/Logger.html) that logs in json format with the below information.
4
6
 
5
7
  ```json
@@ -63,6 +65,8 @@ Output from example 1:
63
65
  {"date":"2023-07-06T15:10:24+10:00","file_name":"test_logger.rb","calling_class":"Object","function_name":"test","lineno":31,"severity":"INFO","pid":44665,"message":"Hello World call from Object"}
64
66
  ```
65
67
 
68
+ #### Example 2
69
+
66
70
  Example 2 in a single files called `test_logging.rb`:
67
71
 
68
72
  ```ruby
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonRubyLogger
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
@@ -12,7 +12,7 @@ module JsonRubyLogger
12
12
  # This is the magical bit that gets mixed into your classes
13
13
  def logger
14
14
  # caller_locations returns an array of Thread::Backtrace::Location
15
- JsonRubyLogger.logger(self.class.name, caller_locations.first)
15
+ @logger ||= JsonRubyLogger.logger(self.class.name, caller_locations.first)
16
16
  end
17
17
 
18
18
  # Global, memoized, lazy initialised instance of a logger
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_ruby_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ml
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-06 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger