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
@@ -50,7 +24,7 @@ Run the bundle command to install it:
50
24
51
25
$ bundle
52
26
53
-
Or install it manually:
27
+
or install it manually:
54
28
55
29
$ gem install stackify-api-ruby
56
30
@@ -60,21 +34,7 @@ After you install stackify-api-ruby you need to run the generator:
60
34
61
35
The generator creates a file 'config/initializers/stackify.rb' configuring stackify-api-ruby with your API key. You can change default settings there.
62
36
63
-
Usage: Logging
64
-
------------------
65
-
### Rails Environment
66
-
67
-
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:
68
-
69
-
Rails.logger.info "Some log message"
70
-
71
-
If you want to redefine <b>logger</b>, you should add
to your config/environments/%environment%. <b>Note:</b> in this case Stackify#config.log_level will affect entire system.
76
-
77
-
### Other Environment
37
+
### Non-Rails
78
38
79
39
For using stackify-api-ruby gem within any Ruby application add to top of your main file:
80
40
@@ -86,10 +46,9 @@ After that you need to make base configuration:
86
46
config.api_key = "your_api_key"
87
47
config.env = :development
88
48
config.app_name = "Your app name"
89
-
config.app_location = "/somewhere/public"
90
49
end
91
50
92
-
"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).
51
+
## Optional Configuration
93
52
94
53
Gem has 3 modes of work - "both", "logging", "metrics". Mode "both" turns on both parts of gem - logging and metrics.
95
54
If you need ONLY logging or metrics use "logging" or "metrics" mode accordingly.
@@ -100,18 +59,32 @@ If you want to use proxy for sending request, you can do it in such way:
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:
67
+
68
+
Rails.logger.info "Some log message"
69
+
70
+
If you want to redefine <b>logger</b>, you should add
0 commit comments