lumberaxe 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
  SHA256:
3
- metadata.gz: 9f5c1078c58ccacfe207db7fb1ad45fd544c235efcbf510d44ccda8e2a156aca
4
- data.tar.gz: f701378e011e2488500621c02cee6329ff9d98483dc09990f5379c430fd3e12f
3
+ metadata.gz: 6a13030f171f6ece656a6e45946df454da7632af3379ffef3178028fde7de8b0
4
+ data.tar.gz: 268b19ec8b032f3bf43f194b422eb77ff1c7a2122ef79f716d373c6c7a4c1dd7
5
5
  SHA512:
6
- metadata.gz: 4c186c16ac445cf75f51dc54759c6ba3d6ac469f9c53dc17631059242318ee27610bad0b7d06fdba025ca6008541157badb4cd99c9efe354fbdd54a4982a724a
7
- data.tar.gz: 5328a77d64bc55bc00f15f6ed5c5a4ef58d7acfba39df55531c2f94be84da5e327b26e85ccf2afe68a9d08e4d1a4149875d2b82bd74e829e101af7ce0df2c3f0
6
+ metadata.gz: a7622bf1f4cecc0b2628efcf3ed55aa22b74cd753eb9cad9be541ba8859a1460dc125ee1b0f5f5a6ff58e4186cf8210214afd8ec92e1e3fe4ea86d2ef0520ae3
7
+ data.tar.gz: 2badec4eb833d907fbeafdc1bfd14f0c7ccff60528fe719422eb5b62dddfd6ae48a03d09ec7416823c7b7af4380aa5bd29462825f5e571ca2b7c1078ab4a61fb
data/docs/README.md CHANGED
@@ -9,7 +9,7 @@ After installing the gem, require it as part of your application configuration.
9
9
  ```ruby
10
10
  # application.rb
11
11
 
12
- require "lumberaxe"
12
+ require "lumberaxe/railtie"
13
13
  ```
14
14
 
15
15
  ## Setting JSON logging
@@ -19,5 +19,15 @@ To set up JSON logging on puma, add this to your puma config:
19
19
  ```ruby
20
20
  # puma.rb
21
21
 
22
+ require "lumberaxe"
23
+
22
24
  log_formatter(&Lumberaxe.puma_formatter)
23
25
  ```
26
+
27
+ If you don't have a tool for parsing JSON in local development, you can add this:
28
+
29
+ ```ruby
30
+ # development.rb
31
+
32
+ config.logger = ActiveSupport::TaggedLogging.new(Logger.new($stdout))
33
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Lumberaxe
4
4
  class Logger < ::ActiveSupport::Logger
5
- cattr_accessor :log_level
5
+ cattr_accessor(:log_level) { :debug }
6
6
 
7
7
  def initialize(output = $stdout, progname:, level: log_level)
8
8
  super output
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lograge"
4
+ require "lumberaxe"
4
5
 
5
6
  module Lumberaxe
6
7
  class Railtie < Rails::Railtie
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lumberaxe
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/lumberaxe.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "logger"
4
4
  require "active_support"
5
- require "lumberaxe/railtie" if defined?(Rails)
6
5
  require "lumberaxe/logger"
7
6
  require "lumberaxe/json_formatter"
8
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lumberaxe
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
  - Carlos Palhares
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-08-15 00:00:00.000000000 Z
12
+ date: 2022-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport