concise_logging 0.0.1 → 0.1.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 +4 -4
- data/README.md +19 -4
- data/concise_logging.gemspec +2 -0
- data/img/screenshot.png +0 -0
- data/lib/concise_logging/railtie.rb +9 -0
- data/lib/concise_logging/version.rb +1 -1
- data/lib/concise_logging.rb +1 -0
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b3ddb997dc1557b82d6502f371067527c9f2ede
|
4
|
+
data.tar.gz: 55e38ca12a4910fc681b2234b66f8e48f9a0d0c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e02b3a5840803c32a7f0c9f20072effafe0d42044d6c54c172e906c929909d6fb0ea6b742d9faaed6f3205e6088b64e7d4965122bc1131b94ae26ad7919344c2
|
7
|
+
data.tar.gz: e8c346776f50a2257644a4da6027d6d7c71b5834910c4c89d8fd2b1b6a04ff82f468379ee29a83bc5c6c4e9cbba1923e51b4ae49101cc9c550502dd788595702
|
data/README.md
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
# ConciseLogging
|
2
2
|
|
3
|
-
|
3
|
+
Concise request logging for Rails production
|
4
|
+
|
5
|
+

|
6
|
+
|
7
|
+
Logs a concise single line for each request at `:warn` level. This allows
|
8
|
+
logging requests without all the extra logging that `:info` level outputs.
|
9
|
+
|
10
|
+
Not suitable for development but ideal for production settings where each
|
11
|
+
request and associated parameters is logged.
|
12
|
+
|
13
|
+
Inspired by a [blog post on RubyJunky.com][1].
|
14
|
+
|
15
|
+
Special thanks to [Zohreh Jabbari](https://github.com/zohrehj) for doing the
|
16
|
+
initial coding and proof of concept.
|
17
|
+
|
18
|
+
[1]: http://rubyjunky.com/cleaning-up-rails-4-production-logging.html
|
4
19
|
|
5
20
|
## Installation
|
6
21
|
|
@@ -21,11 +36,11 @@ Or install it yourself as:
|
|
21
36
|
## Usage
|
22
37
|
|
23
38
|
Add this to your `config/production.rb`. Configure tagging as per your desires.
|
39
|
+
We use tagging to indicate application with a 2 letter code and environment with
|
40
|
+
a single letter (e.g., p = production, s = staging).
|
24
41
|
|
25
42
|
````ruby
|
26
|
-
|
27
|
-
ConciseLogging::LogSubscriber.attach_to :action_controller
|
28
|
-
|
43
|
+
# Configure logger to log warn and above
|
29
44
|
config.log_level = :warn
|
30
45
|
config.log_tags = ["cv-#{Rails.env[0]}"]
|
31
46
|
config.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(File.join(Rails.root, "log", "#{Rails.env}.log")))
|
data/concise_logging.gemspec
CHANGED
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
+
spec.add_runtime_dependency "rails", "~> 4.1"
|
21
|
+
|
20
22
|
spec.add_development_dependency "bundler", "~> 1.7"
|
21
23
|
spec.add_development_dependency "rake", "~> 10.0"
|
22
24
|
end
|
data/img/screenshot.png
ADDED
Binary file
|
data/lib/concise_logging.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concise_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerry Shaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.1'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,9 +65,11 @@ files:
|
|
51
65
|
- README.md
|
52
66
|
- Rakefile
|
53
67
|
- concise_logging.gemspec
|
68
|
+
- img/screenshot.png
|
54
69
|
- lib/concise_logging.rb
|
55
70
|
- lib/concise_logging/log_middleware.rb
|
56
71
|
- lib/concise_logging/log_subscriber.rb
|
72
|
+
- lib/concise_logging/railtie.rb
|
57
73
|
- lib/concise_logging/version.rb
|
58
74
|
homepage: https://github.com/gshaw/concise_logging
|
59
75
|
licenses:
|