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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7dba215bb05df477f6a78b36c8bb4494a61ef9c
4
- data.tar.gz: 8f74d21508c5a4dec6c828edef7c4e6299d8432f
3
+ metadata.gz: c5ea032a9247102568114633b13856105c137184
4
+ data.tar.gz: 99611a59b1dd09aa3457ecde563d67ddb4deabb1
5
5
  SHA512:
6
- metadata.gz: a1045dd6f7c0e08509a0d28935c5e69c57c84a80ec11c2aaa6a1f66233124afd36546a303f0babdb155b3c09379fc690d50c8a0883f381ba25bbfc38cbac77e9
7
- data.tar.gz: 38959d801e4a7963687946d9a21f0aea8da99dc925dc5024bfa1de75f0a99e41b7ac306c9ce9994510a7a9cc8b15fa77ff1c203270e7f41db8395611d2cb33f9
6
+ metadata.gz: 1382c6c5607a165cc64e4e2b2f8c5bec45578b0f3675de4554ed09a64fd81c42eeae9f64e1147b61e892503184592ec49433c52b595a2240405fb8c38ce9b295
7
+ data.tar.gz: c898a1e102e8c88f80b65932e6aa36266d455bc1987fe1572e1be3d2f3d58410ab3b6b26704880f7343d2ed03cd03e2746f031896eb43f1702633d1700e442b7
@@ -1,3 +1,3 @@
1
1
  module Railman
2
- VERSION = '0.6.9'
2
+ VERSION = '0.6.10'
3
3
  end
@@ -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.9
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