log_tribe 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.pullreview.yml +77 -0
- data/README.md +17 -0
- data/lib/log_tribe/loggers.rb +1 -1
- data/lib/log_tribe/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 043d755329f2ec153464c1950d716eb5cbfb7e6e
|
4
|
+
data.tar.gz: a8315596ff1fbd28ea086179423aaabf26c7ade1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8e415004c316a0bc36249528e6c8960c30f4983a0948394ddb6fea4257fb975748b92ba1f8e5cda558a0621814481846d3c9e6608ceb5dce31b3fa36eb49a14
|
7
|
+
data.tar.gz: 7f8ba898adfcbbd99164e5c907afcb531fd43fe77f3edeab2fde824de6ab6b58ccee8cfe1f91dd1bbe3f31f7e6e23d0ab14fc5ebfc564bda28b0600212f576dc
|
data/.pullreview.yml
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
---
|
2
|
+
rules:
|
3
|
+
ignore:
|
4
|
+
# - add_db_index
|
5
|
+
# - add_underscores_to_large_numeric
|
6
|
+
# - always_else_in_case
|
7
|
+
# - ambiguous_first_argument
|
8
|
+
# - assigned_but_unused_variable
|
9
|
+
# - assignment_in_conditional
|
10
|
+
# - avoid_copy_paste
|
11
|
+
# - avoid_empty_rescue_block
|
12
|
+
# - avoid_global_variable
|
13
|
+
# - avoid_similar_code
|
14
|
+
# - avoid_singleton_variable
|
15
|
+
# - avoid_using_curly_braces_for_multi-line_blocks
|
16
|
+
# - check_return_value_of_save
|
17
|
+
# - don_t_use_parentheses_around_the_condition
|
18
|
+
# - extra_blank_line_detected
|
19
|
+
# - extra_blank_line_detected_at_body_beginning
|
20
|
+
# - extra_blank_line_detected_at_body_end
|
21
|
+
# - favor_if_unless_for_single_line
|
22
|
+
# - improve_coverage_of_class
|
23
|
+
# - improve_coverage_of_method
|
24
|
+
# - improve_coverage_of_project
|
25
|
+
# - indent_when_as_deep_as_case
|
26
|
+
- missing_class_documentation
|
27
|
+
- missing_method_documentation
|
28
|
+
# - naming_convention_for_class
|
29
|
+
# - naming_convention_for_method
|
30
|
+
# - naming_convention_for_module
|
31
|
+
# - no_for_loop
|
32
|
+
# - no_instance_variable_in_partial
|
33
|
+
# - no_params_in_view
|
34
|
+
# - no_session_in_view
|
35
|
+
# - omit_parentheses_when_no_args
|
36
|
+
# - prefer_accolades_over_doend_for_single-line_blocks
|
37
|
+
# - prefer_map_over_collect
|
38
|
+
# - prefer_reduce_over_inject
|
39
|
+
# - prefer_ruby_19_new_hash_syntax
|
40
|
+
# - prefer_ruby_19_new_lambda_syntax
|
41
|
+
# - prefer_single_quoted_strings
|
42
|
+
- reduce_number_of_params
|
43
|
+
# - refactor_complex_class
|
44
|
+
# - refactor_complex_method
|
45
|
+
# - remove_trailing_whitespace
|
46
|
+
# - restrict_auto_generated_routes
|
47
|
+
# - shadowing_outer_local_variable
|
48
|
+
# - simplify_call_to_render
|
49
|
+
# - simplify_call_to_render_partial
|
50
|
+
# - space_between_curly_brace_and_pipe_missing
|
51
|
+
# - space_inside_closing_curly_brace_missing
|
52
|
+
# - space_inside_opening_curly_brace_missing
|
53
|
+
# - space_inside_parentheses_detected
|
54
|
+
# - space_inside_square_brackets_detected
|
55
|
+
# - space_missing_after_colon
|
56
|
+
# - space_missing_after_comma
|
57
|
+
# - space_missing_after_hash_sign
|
58
|
+
# - space_missing_after_semicolon
|
59
|
+
# - space_missing_inside_closing_curly_brace
|
60
|
+
# - space_missing_inside_opening_curly_brace
|
61
|
+
# - space_missing_to_left_of_parentheses
|
62
|
+
# - star_interpreted_as_argument_prefix
|
63
|
+
# - surrounding_space_missing_for_accolade
|
64
|
+
# - surrounding_space_missing_for_addition
|
65
|
+
# - surrounding_space_missing_for_arrow
|
66
|
+
# - surrounding_space_missing_for_assign
|
67
|
+
# - surrounding_space_missing_for_divide
|
68
|
+
# - surrounding_space_missing_for_equality
|
69
|
+
# - surrounding_space_missing_for_greater_than
|
70
|
+
# - surrounding_space_missing_for_incr
|
71
|
+
# - surrounding_space_missing_for_minus
|
72
|
+
# - surrounding_space_missing_for_multiplication
|
73
|
+
# - surrounding_space_missing_for_not_equal
|
74
|
+
# - surrounding_space_missing_for_t_square
|
75
|
+
# - use_a_logger
|
76
|
+
# - use_def_with_parentheses_when_there_are_arguments
|
77
|
+
# - uses_spaces_instead_of_tabs
|
data/README.md
CHANGED
@@ -20,6 +20,8 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
+
### Basic example
|
24
|
+
|
23
25
|
```ruby
|
24
26
|
log = LogTribe::Loggers.new([Logger.new(STDOUT), Fluent::Logger::FluentLogger.new(nil, host: 'srv', port: 10_010)],
|
25
27
|
{ tag_name: 'app_name.app_type' })
|
@@ -27,6 +29,21 @@ log.info 'this log message is send to the 2 loggers passed in parameter'
|
|
27
29
|
log.debug 'debug message send too...'
|
28
30
|
log.close # Or not...
|
29
31
|
```
|
32
|
+
### Sinatra example
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
# your_sinatra_app.rb
|
36
|
+
require 'log_tribe'
|
37
|
+
# ...
|
38
|
+
configure do
|
39
|
+
# ...
|
40
|
+
enable :logging
|
41
|
+
log_tribe = LogTribe::Loggers.new([Logger.new(STDOUT),
|
42
|
+
Fluent::Logger::FluentLogger.new(nil, host: 'srv', port: 10_010)])
|
43
|
+
use Rack::CommonLogger, log_tribe
|
44
|
+
end
|
45
|
+
# ...
|
46
|
+
```
|
30
47
|
|
31
48
|
## Contributing
|
32
49
|
|
data/lib/log_tribe/loggers.rb
CHANGED
data/lib/log_tribe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: log_tribe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Kakesa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,6 +88,7 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
|
+
- ".pullreview.yml"
|
91
92
|
- ".rspec"
|
92
93
|
- ".rubocop.yml"
|
93
94
|
- ".travis.yml"
|