You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-21Lines changed: 8 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,14 +24,13 @@ After you install stackify-api-ruby you need to run the generator:
24
24
25
25
$ rails g stackify --api_key=your_api_key
26
26
27
-
The generator creates a file under config/initializers/stackify.rb configuring stackify-api-ruby with your API key. You can change default settings there.
27
+
The generator creates a file 'config/initializers/stackify.rb' configuring stackify-api-ruby with your API key. You can change default settings there.
28
28
29
29
Usage: Logging
30
30
------------------
31
-
32
31
### Rails Environment
33
32
34
-
stackify-api-ruby starts working with start of Rails. Every occured errorwill be cought and sent to Stackify automatically. The same situation with logs - you just use the Rails logger as usual:
33
+
stackify-api-ruby starts with start of Rails. Every error, which occurs within your application, will be caught and sent to Stackify automatically. The same situation with logs - you just use the Rails logger as usual:
35
34
36
35
Rails.logger.info "Some log message"
37
36
@@ -46,8 +45,8 @@ After that you need to make base configuration:
46
45
Stackify.setup do |config|
47
46
config.api_key = "your_api_key"
48
47
config.env = :development
49
-
config.app_name = "Your's app name"
50
-
config.app_location = "/somewhere/public"
48
+
config.app_name = "Your app name"
49
+
config.app_location = "/somewhere/public"
51
50
end
52
51
53
52
"api_key" - it's you key for Stackify. "app-location" - it's location of your application for Nginx/Apache(for Nginx it's value of 'root', for Apache it's value of 'DocumentRoot' at config files).
@@ -61,31 +60,19 @@ You can set minimal level of logs, which should be caught by gem:
61
60
62
61
config.log_level = :error
63
62
64
-
By default, gem sends logs to Stackify every 60 seconds, you can increase this value to higher if need:
65
-
66
-
config.send_interval = 60 #value in seconds, could not be less than 60 seconds
67
-
68
-
All logs, errors, and metrics are queued within the gem and uploaded on a background thread. By default, the maximum amount of logs is 1,000 log items, you can decrease this value:
69
-
70
-
config.queue_max_size = 600
71
-
72
-
To help prevent flooding the system there is a parameter - max amount of the same error per minute:
73
-
74
-
config.flood_limit = 100
75
-
76
-
If you want to use proxy for sendig request, you can do it in such way:
63
+
If you want to use proxy for sending request, you can do it in such way:
77
64
78
65
config.with_proxy = true
79
66
config.proxy_host = "127.0.0.1"
80
67
config.proxy_port = "8118"
81
68
config.proxy_user = nil
82
69
config.proxy_pass = nil
83
70
84
-
For logging own work stackify-api-rubystackify-api-rubygem uses such logger:
71
+
For internal logging stackify-api-ruby uses such logger:
0 commit comments