testa_logger 0.1.12 → 0.1.15

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: 1814a8963c804133272adbfcd17259835408297c26337d01f4a971f20d55bc4d
4
- data.tar.gz: bb298ffa5e0ba63e1c74264713197284447485e60581a64c76918569f6c7f181
3
+ metadata.gz: d15a3ba96f731bdc83cbfc803cf24780ed813efc431b88a88f9dcdc40c9340dd
4
+ data.tar.gz: cacdb6aa0a8034fc20ad16e46cea9f6f620dcb13267925d6aec1cedba78126ca
5
5
  SHA512:
6
- metadata.gz: 2ee138ceee7e90af996de3d03cfdc7de16079fbc87b13e6d328b124b49f48690722aa74b1bb723f8fe8e6bc725a51ff6a3c4f618fd645261bb1d144cd4ec9b15
7
- data.tar.gz: ac06a5dc93d92841c4729f8885d97f6f90596d89f68f254c40ae4c1a8c7abb8d019e24ce91d1a65e7f05ac84c00f865bbbd7fb04142036eb2f6b4a839df4582c
6
+ metadata.gz: 2e73551ed4107d57cbf8dc02597c40f60eb62c877bc2bc5c4c8ef4b41824fbe0359a0c5c82ab0fc616875c5c97e408905be1660e0dff7051c53ffb3901d13762
7
+ data.tar.gz: d508e8ba1bc3f3ebec7224636bc550cc8bd4a3a739dd71d3ef325193445b1a5b2acb2f662f6d77af8d8c1eebe455a93890dc45bad93818b122fef0bd347fa5a7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testa_logger (0.1.12)
4
+ testa_logger (0.1.15)
5
5
  activesupport
6
6
  awesome_print
7
7
  aws-sdk-s3
@@ -44,6 +44,7 @@ module TestaLogger
44
44
  }
45
45
 
46
46
  handle_user_options(options)
47
+ @live = false if app == "ws" # will cause endless loop otherwise
47
48
  end
48
49
 
49
50
  def format_app_and_groups(app, group, subgroup)
@@ -58,11 +58,9 @@ module TestaLogger
58
58
 
59
59
  def setup_dispatcher
60
60
  @dispatcher = Dispatcher.new(
61
+ self,
61
62
  options.faye_url,
62
- options.faye_token,
63
- app,
64
- group,
65
- subgroup
63
+ options.faye_token
66
64
  )
67
65
  end
68
66
 
@@ -82,27 +80,27 @@ module TestaLogger
82
80
  options.formatter
83
81
  end
84
82
 
85
- def debug(tag = NO_TAG, *args, &block)
83
+ def debug(tag = "", *args, &block)
86
84
  add_log_to_queue(DEBUG, tag, args, &block)
87
85
  end
88
86
 
89
- def info(tag = NO_TAG, *args, &block)
87
+ def info(tag = "", *args, &block)
90
88
  add_log_to_queue(INFO, tag, args, &block)
91
89
  end
92
90
 
93
- def warn(tag = NO_TAG, *args, &block)
91
+ def warn(tag = "", *args, &block)
94
92
  add_log_to_queue(WARN, tag, args, &block)
95
93
  end
96
94
 
97
- def error(tag = NO_TAG, *args, &block)
95
+ def error(tag = "", *args, &block)
98
96
  add_log_to_queue(ERROR, tag, args, &block)
99
97
  end
100
98
 
101
- def fatal(tag = NO_TAG, *args, &block)
99
+ def fatal(tag = "", *args, &block)
102
100
  add_log_to_queue(FATAL, tag, args, &block)
103
101
  end
104
102
 
105
- def unknown(tag = NO_TAG, *args, &block)
103
+ def unknown(tag = "", *args, &block)
106
104
  add_log_to_queue(UNKNOWN, tag, args, &block)
107
105
  end
108
106
 
@@ -214,6 +212,8 @@ module TestaLogger
214
212
  formatted_severity = format_severity(level)
215
213
  formatted_text = format_message(formatted_severity, time, "", text)
216
214
 
215
+ # after forking process, write thread will stop working in the forked process
216
+ start_write_thread if @write_thread.nil? || @write_thread.status == false
217
217
  @queue << formatted_text
218
218
  @dispatcher.push(level, time, tag, formatted_text) if options.live
219
219
  end
@@ -1,3 +1,3 @@
1
1
  module TestaLogger
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testa_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - karlo.razumovic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-17 00:00:00.000000000 Z
11
+ date: 2022-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport