log_sense 2.0.0 → 2.2.0

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: 288570381159c730801985845d064e62fa8ad08ee6b44f48ebf2928e60e80e47
4
- data.tar.gz: 64d80612d568f4fd1991257d2755ec38ef94543b1fd451097efd6e9006ab551f
3
+ metadata.gz: 8b24aa444f64beeb8b13bda22aae730130cff025b4d122557499d3afd2ec2e73
4
+ data.tar.gz: 809c695be701f9a6f17a4b31d4c9c61827a97a9088cb180b6f7f60a794e498f3
5
5
  SHA512:
6
- metadata.gz: 6352f42ccbd453e9adf4af83372ad8c7113f58d419e502e444dad2b3f3ad5e54b1f31f077631040ea473a9b2976e38ff2b8960cb91091f65830ed03b987cb3e8
7
- data.tar.gz: 4f01dc9e7ea6a53d983d51508e69710999741f6e5c74b49c2ab42e45a312f3364a07f7ff58fe6dd8e852f08d67d1df110a86c7e0330c6301e522bf8c595839f3
6
+ metadata.gz: afff457f8f952f7f6b806baaf56ac34010027498be04fdbfaa91653ab70699f3d3d85222b47437c2df151f00fb953e23d21a5ac537562cf14a157459762e4855
7
+ data.tar.gz: 911594383266801861454d6facb9ee4c2db852979d2349250d988934721925ed6592b9fdbb2c63d43814305ca062478d8984bd07166ff90c3928120dc17c3129
data/CHANGELOG.org CHANGED
@@ -2,20 +2,31 @@
2
2
  #+AUTHOR: Adolfo Villafiorita
3
3
  #+STARTUP: showall
4
4
 
5
- * 2.0.1
5
+ * 2.2.0
6
6
 
7
- - Add GitHub action for publishing to RubyGems after repeated failures
8
- with authentication from the command line
7
+ - [User] Better management of Delayed Job (show also completed)
8
+ - [Refactoring] Regexps are now pre-compiled with /o
9
9
 
10
- * 2.0.0 (Not released)
11
-
12
- - World Map
13
- - Dark mode
14
- - Fix link colors in sidebar
15
- - Bars in the statuses bar plot are now colored according to status
16
- - Add "statuses by day" in Rails report
17
- - Enlarge "errors" and "potential attacks" reports
18
- - Various smaller fixes
10
+ * 2.1.0
11
+
12
+ - [User] Delayed Job Errors
13
+ - [User] Improve scatter plot about performances (Use labels, swap x and y axes,
14
+ better tooltip)
15
+ - [User] Updated DB-IP country file to Aug 2024 version (19/08).
16
+ - [User] Fixes CHANGELOG
17
+ - [User] Revises "Fatal Errors" removing a bit of redundancy and collecting all
18
+ message
19
+ - [Bug/User] Added filtering on date on reports which still did not use it
20
+
21
+ * 2.0.0
22
+
23
+ - [User] World Map
24
+ - [User] Dark mode
25
+ - [User] Bars in the statuses bar plot are now colored according to status
26
+ - [User] Add "statuses by day" in Rails report
27
+ - [User] Enlarge "errors" and "potential attacks" reports
28
+ - [Bug] Fix link colors in sidebar
29
+ - [Code] Various smaller fixes
19
30
 
20
31
  * 1.9.0
21
32
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- log_sense (2.0.0)
4
+ log_sense (2.2.0)
5
5
  browser (~> 5.3.0)
6
6
  ipaddr (~> 1.2.0)
7
7
  iso_country_codes (~> 0.7.0)
data/README.org CHANGED
@@ -47,9 +47,10 @@ reports in TXT and HTML:
47
47
  - Rails Performance
48
48
  - Controller and Methods by Device
49
49
  - Fatal Events
50
- - Internal Server Errors
51
- - Errors
52
- - Potential Attacks
50
+ - Fatal Events
51
+ - Fatal Events (grouped by type)
52
+ - Job Error
53
+ - Job Errors (grouped)
53
54
  - Browsers
54
55
  - Platforms
55
56
  - IPs
data/exe/log_sense CHANGED
@@ -168,4 +168,6 @@ else
168
168
 
169
169
  warn "Emitting..." if @options[:verbose]
170
170
  puts LogSense::Emitter.emit @reports, @data, @options
171
+
172
+ exit 0
171
173
  end
Binary file
@@ -112,7 +112,7 @@ module LogSense
112
112
  count(path),
113
113
  count(distinct(unique_visitor)),
114
114
  #{human_readable_size}, status from LogLine
115
- where #{result} and #{type} and #{filter}
115
+ where #{filter} and #{result} and #{type}
116
116
  group by path
117
117
  order by count(path) desc
118
118
  limit #{@options[:limit]}"
@@ -79,6 +79,15 @@ module LogSense
79
79
  "$" => "\\$"
80
80
  }
81
81
 
82
+ # output text-left, center, right, according to column_alignment
83
+ def self.alignment_class(report, index)
84
+ if report[:column_alignment]
85
+ "text-#{report[:column_alignment][index]}"
86
+ else
87
+ ""
88
+ end
89
+ end
90
+
82
91
  # taken from Ruby on Rails
83
92
  def self.escape_javascript(javascript)
84
93
  javascript = javascript.to_s