sysloggly 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 799887c8c66799cf6adecd2b6c4126d5a71e48cb
4
+ data.tar.gz: 2abb2a85526ee55d9e9c9d855f30fe4dee9e6b0c
5
+ SHA512:
6
+ metadata.gz: 1ecdb9ed3e3eb8e12d28137f3f44fca51509592525e5d2c202264f66592076028af3993232cce9e4de026be3261ca335fd45b4fff78a892f912d8774ba914651
7
+ data.tar.gz: 4b863a3ecd2867461213f74d7d6664853b0d541ec2c782fe14ce7793518aa8b79e05e861d2191abea8567e348a789659feb4293d8b2c3b70133ac4e250632f7f
@@ -0,0 +1,33 @@
1
+ module Sysloggly
2
+ if Object.const_defined?(:Rails) and Rails.const_defined?(:Railtie)
3
+ # @private
4
+ class Railtie < Rails::Railtie
5
+ initializer 'sysloggly.initialize' do |app|
6
+ config = app.config
7
+
8
+ # find app name and app environment
9
+ app_name = Rails.application.class.parent_name
10
+ environment = Rails.env
11
+ begin
12
+ # try to find a honeybadger configuration
13
+ honeybadger = YAML.load_file(Rails.root.join('config', 'honeybadger.yml'))
14
+ environment = honeybadger['env'].to_s
15
+ rescue
16
+ end
17
+
18
+ # add https://github.com/crohr/syslogger
19
+ syslogger = Syslogger.new(app_name, Syslog::LOG_PID, Syslog::LOG_LOCAL7)
20
+ config.syslogger = syslogger
21
+
22
+ # add https://github.com/roidrage/lograge
23
+ config.lograge.enabled = true
24
+ config.lograge.formatter = Lograge::Formatters::Json.new
25
+ config.lograge.keep_original_rails_log = true
26
+ config.lograge.logger = config.syslogger
27
+ config.lograge.custom_options = lambda do |event|
28
+ { env: environment }
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,3 @@
1
+ module Sysloggly
2
+ VERSION = '0.1.0'
3
+ end
data/lib/sysloggly.rb ADDED
@@ -0,0 +1,5 @@
1
+ require 'lograge'
2
+ require 'syslogger'
3
+
4
+ require 'sysloggly/rails'
5
+ require 'sysloggly/version'
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sysloggly
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joergen Dahlke
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: lograge
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: syslogger
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Lograge and Syslog integration for Rails apps.
70
+ email:
71
+ - joergen.dahlke@gmail.de
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - lib/sysloggly.rb
77
+ - lib/sysloggly/rails.rb
78
+ - lib/sysloggly/version.rb
79
+ homepage: https://github.com/jdahlke/sysloggly
80
+ licenses: []
81
+ metadata: {}
82
+ post_install_message:
83
+ rdoc_options: []
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubyforge_project: bima-loggly
98
+ rubygems_version: 2.5.2
99
+ signing_key:
100
+ specification_version: 4
101
+ summary: Lograge and Syslog integration for Rails apps.
102
+ test_files: []