RTALogger 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/lib/RTALogger/version.rb +1 -1
- data/lib/log_manager.rb +2 -2
- data/lib/log_propagator.rb +1 -1
- data/lib/log_repository.rb +2 -3
- data/lib/rta_logger_config.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 344cc6430343748963541c7f025549d8ee80007f8abc30fa6218b8924fe73755
|
4
|
+
data.tar.gz: 4c84b47e1f0a6d9007c1d0df5dc210955e3a0c525851a2edd46be8732b4e8d57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a8e5f960166d6dd6ffc5627d61eedcc4bd0a3e15dcbc9dc2bcc4d8d6da20810ddc05a302931001165e28eee7e6db1c4513cc352b8425091f8a1271ecd05cdd0
|
7
|
+
data.tar.gz: 4c3a4cb3e2458afbceceabd517083565992ae034ca8f5ad9baddb580ab37919d422e7f9e670ae94a62aecbad3eab9e9bee768cab03e747b1e2510900c623c06d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -94,7 +94,7 @@ To use log manager APIs, first step is to have a quick review on Log Data Struct
|
|
94
94
|
"app_name": "TestApp",
|
95
95
|
"severity_level": "trace",
|
96
96
|
"buffer_size": 100,
|
97
|
-
"flush_wait_seconds":
|
97
|
+
"flush_wait_seconds": 5,
|
98
98
|
"repositories":
|
99
99
|
[
|
100
100
|
{
|
@@ -206,7 +206,7 @@ the result will be:
|
|
206
206
|
"app_name": "TestApp",
|
207
207
|
"severity_level": "trace",
|
208
208
|
"buffer_size": 100,
|
209
|
-
"flush_wait_seconds":
|
209
|
+
"flush_wait_seconds": 5,
|
210
210
|
"repositories":
|
211
211
|
[
|
212
212
|
{
|
@@ -291,7 +291,7 @@ the result will be:
|
|
291
291
|
- buffer_size: Minimune possible value for this attribute is 100 and defines memory buffer size (number of buffered log objects) to
|
292
292
|
decread api consumers wait time. when the buffer is full the flush operation will
|
293
293
|
save buffered logs to log repositoies.
|
294
|
-
- flush_wait_seconds: Minimum possible value for this attribure is
|
294
|
+
- flush_wait_seconds: Minimum possible value for this attribure is 5 seconds and defines time in soconds which log managers wait to flush buffered log records
|
295
295
|
to log repository.
|
296
296
|
- repositories: Array of log repositories. It is possible to define multiple log repositories to
|
297
297
|
store log data. there are variaty of log repositories and it is possible to
|
@@ -387,7 +387,7 @@ the result will be:
|
|
387
387
|
# log_manager.enable
|
388
388
|
# log_manager.default_severity_level
|
389
389
|
# log_manager.buffer_size (minimum is 100)
|
390
|
-
# log_manager.flush_wait_time (minimum
|
390
|
+
# log_manager.flush_wait_time (minimum 5 second)
|
391
391
|
# repository.enable
|
392
392
|
# topic.enable
|
393
393
|
# topic.severity_level
|
data/lib/RTALogger/version.rb
CHANGED
data/lib/log_manager.rb
CHANGED
@@ -27,7 +27,7 @@ module RTALogger
|
|
27
27
|
@topic_semaphore = Mutex.new
|
28
28
|
@log_semaphore = Mutex.new
|
29
29
|
self.buffer_size = ENV.fetch('RTA_LOGGER_BUFFER_SIZE', 100)
|
30
|
-
self.flush_wait_time = ENV.fetch('RTA_LOGGER_FLUSH_WAIT_SECONDS',
|
30
|
+
self.flush_wait_time = ENV.fetch('RTA_LOGGER_FLUSH_WAIT_SECONDS', 5)
|
31
31
|
@topics = {}
|
32
32
|
@log_records = []
|
33
33
|
@propagator = LogFactory.new_log_propagator
|
@@ -64,7 +64,7 @@ module RTALogger
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def flush_wait_time=(time_in_seconds)
|
67
|
-
@flush_wait_time = time_in_seconds <
|
67
|
+
@flush_wait_time = time_in_seconds < 5 ? 5 : time_in_seconds
|
68
68
|
end
|
69
69
|
|
70
70
|
def config_use_json_file(file_name, title = '')
|
data/lib/log_propagator.rb
CHANGED
@@ -92,7 +92,7 @@ module RTALogger
|
|
92
92
|
if repository.present?
|
93
93
|
repository.apply_run_time_config(repository_config)
|
94
94
|
else
|
95
|
-
repository = ::RTALogger::LogFactory.create_repository(repository_config['type'],
|
95
|
+
repository = ::RTALogger::LogFactory.create_repository(repository_config['type'], repository_config)
|
96
96
|
add_log_repository(repository)
|
97
97
|
end
|
98
98
|
end
|
data/lib/log_repository.rb
CHANGED
@@ -47,9 +47,8 @@ module RTALogger
|
|
47
47
|
@enable = config_json['enable'].nil? ? true : config_json['enable']
|
48
48
|
@title = config_json['title'].nil? ? self.class.to_s.split('::').last.underscore : config_json['title']
|
49
49
|
formatter_config = config_json['formatter']
|
50
|
-
|
51
|
-
|
52
|
-
end
|
50
|
+
|
51
|
+
@formatter = LogFactory.create_formatter(formatter_config['type'], formatter_config) if formatter_config && formatter_config['type']
|
53
52
|
|
54
53
|
apply_config_filters(config_json)
|
55
54
|
end
|
data/lib/rta_logger_config.json
CHANGED