onlylogs 0.4.3 → 0.4.4
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 +4 -4
- data/app/models/onlylogs/file.rb +1 -1
- data/app/models/onlylogs/grep.rb +1 -1
- data/app/views/layouts/onlylogs/application.html.erb +0 -2
- data/app/views/onlylogs/shared/_log_container_styles.html.erb +0 -15
- data/lib/onlylogs/http_logger.rb +7 -1
- data/lib/onlylogs/version.rb +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: 475fe2ae62cd3978f80a766582241d7ae0201176f6e00e93a25710c6b655bd3e
|
|
4
|
+
data.tar.gz: fc3f2a55ee2211fd8920ff0dd1e16c43dd24128a3457cc06b0ee3de5a1b02579
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0a987a309c73c74264b028110ca04c4e15644bc4900efcff482c020354e4c387f7d8bd10ef9f56200337b41d29688e0cf7f7105e9691890424096e3dcc0db68
|
|
7
|
+
data.tar.gz: fdfdbc117ed93a3903435be55897a226a0aa5381581f56ee9676c1cc39d16886b96581f45e0357b81722cb87eb40c1d42be0c364fbd901516a0bbd40aa45f37f
|
data/app/models/onlylogs/file.rb
CHANGED
|
@@ -88,7 +88,7 @@ module Onlylogs
|
|
|
88
88
|
while (line = file.gets)
|
|
89
89
|
if line.end_with?("\n")
|
|
90
90
|
# Complete line - store as simple string
|
|
91
|
-
lines << line.chomp
|
|
91
|
+
lines << line.chomp.force_encoding(Encoding::UTF_8).scrub
|
|
92
92
|
self.last_position = file.pos
|
|
93
93
|
else
|
|
94
94
|
# Incomplete line at EOF - skip it
|
data/app/models/onlylogs/grep.rb
CHANGED
|
@@ -23,7 +23,7 @@ module Onlylogs
|
|
|
23
23
|
io.each_line do |line|
|
|
24
24
|
# Line numbers are no longer outputted by super_grep/super_ripgrep
|
|
25
25
|
# Use String.new to create a copy and prevent memory retention from IO buffers
|
|
26
|
-
content = String.new(line.chomp)
|
|
26
|
+
content = String.new(line.chomp, encoding: Encoding::UTF_8).scrub
|
|
27
27
|
|
|
28
28
|
if block_given?
|
|
29
29
|
yield content
|
|
@@ -26,21 +26,6 @@
|
|
|
26
26
|
|
|
27
27
|
.clusterize-content {
|
|
28
28
|
outline: 0;
|
|
29
|
-
counter-reset: line-number;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
pre {
|
|
33
|
-
counter-increment: line-number;
|
|
34
|
-
|
|
35
|
-
&::before {
|
|
36
|
-
content: counter(line-number);
|
|
37
|
-
color: #aaa;
|
|
38
|
-
user-select: none;
|
|
39
|
-
margin-right: 0.5em;
|
|
40
|
-
display: inline-block;
|
|
41
|
-
text-align: right;
|
|
42
|
-
min-width: 3.5em;
|
|
43
|
-
}
|
|
44
29
|
}
|
|
45
30
|
|
|
46
31
|
.color-success {
|
data/lib/onlylogs/http_logger.rb
CHANGED
|
@@ -25,10 +25,16 @@ module Onlylogs
|
|
|
25
25
|
@queue = Queue.new
|
|
26
26
|
@mutex = Mutex.new
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
if @drain_url
|
|
29
|
+
start_sender
|
|
30
|
+
else
|
|
31
|
+
$stderr.puts "Onlylogs::HttpLogger error: ONLYLOGS_DRAIN_URL is not set; logger is disabled."
|
|
32
|
+
end
|
|
29
33
|
end
|
|
30
34
|
|
|
31
35
|
def add(severity, message = nil, progname = nil, &block)
|
|
36
|
+
return true unless @drain_url
|
|
37
|
+
|
|
32
38
|
if message.nil?
|
|
33
39
|
if block_given?
|
|
34
40
|
message = block.call
|
data/lib/onlylogs/version.rb
CHANGED