railman 0.6.9 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/railman/version.rb +1 -1
- data/templates/rails_app/config/initializers/log_formatting.rb +14 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5ea032a9247102568114633b13856105c137184
|
4
|
+
data.tar.gz: 99611a59b1dd09aa3457ecde563d67ddb4deabb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1382c6c5607a165cc64e4e2b2f8c5bec45578b0f3675de4554ed09a64fd81c42eeae9f64e1147b61e892503184592ec49433c52b595a2240405fb8c38ce9b295
|
7
|
+
data.tar.gz: c898a1e102e8c88f80b65932e6aa36266d455bc1987fe1572e1be3d2f3d58410ab3b6b26704880f7343d2ed03cd03e2746f031896eb43f1702633d1700e442b7
|
data/lib/railman/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Logger Formatter mit Timestamp und in Farbe
|
2
|
+
# übernommen von hier: https://cbpowell.wordpress.com/2013/08/09/beautiful-logging-for-ruby-on-rails-4
|
3
|
+
#
|
4
|
+
|
5
|
+
class ActiveSupport::Logger::SimpleFormatter
|
6
|
+
SEVERITY_TO_COLOR_MAP = { 'DEBUG'=>'0;37', 'INFO'=>'32', 'WARN'=>'33', 'ERROR'=>'31', 'FATAL'=>'31', 'UNKNOWN'=>'37' }
|
7
|
+
|
8
|
+
def call(severity, time, progname, msg)
|
9
|
+
formatted_severity = sprintf("%-5s",severity)
|
10
|
+
formatted_time = time.strftime("%d.%m.%Y %H:%M:%S.") << time.usec.to_s[0..2].rjust(3)
|
11
|
+
color = SEVERITY_TO_COLOR_MAP[severity]
|
12
|
+
"\033[0;37m#{formatted_time}\033[0m [\033[#{color}m#{formatted_severity}\033[0m] #{msg.strip} (pid:#{$$})\n"
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Jancev
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- templates/rails_app/config/initializers/exception_notification.rb
|
218
218
|
- templates/rails_app/config/initializers/filter_parameter_logging.rb
|
219
219
|
- templates/rails_app/config/initializers/inflections.rb
|
220
|
+
- templates/rails_app/config/initializers/log_formatting.rb
|
220
221
|
- templates/rails_app/config/initializers/mime_types.rb
|
221
222
|
- templates/rails_app/config/initializers/session_store.rb.tt
|
222
223
|
- templates/rails_app/config/initializers/sidekiq.rb.tt
|