civo-logger 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/lib/civo/logger/middleware.rb +4 -1
- data/lib/civo/logger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6036171c770b0e463648f39628bcd9d2a30743cd
|
4
|
+
data.tar.gz: d322a415e1e35afb854aa37127dc516a92df54c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cc5da6687684e04fab3d08af413ba04f21265c9b0730eb766f045d458d1d56894ddb7805c50f94f33d856f0c70e6d8a4de2498668760bb935f917c47581db0d
|
7
|
+
data.tar.gz: ce3f294646541532435d88d7d6b32a208456d8f3af60c705a91f8ab9c85a6293ea71bb0bd8e30db611afb69acf33fd6ba92a2e6ffc115fbdd729148e214e90ea
|
data/README.md
CHANGED
@@ -20,6 +20,18 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install civo-logger
|
22
22
|
|
23
|
+
## Creating an InfluxDB
|
24
|
+
|
25
|
+
```
|
26
|
+
$ apt install influxdb influxdb-client
|
27
|
+
$ influx
|
28
|
+
> create database civo_requests with duration 7d;
|
29
|
+
> create user admin with password 'SOMETHING' with all privileges;
|
30
|
+
> create user civo with password 'SOMETHINGELSE';
|
31
|
+
> grant all on civo_requests to civo;
|
32
|
+
> exit
|
33
|
+
```
|
34
|
+
|
23
35
|
## Usage
|
24
36
|
|
25
37
|
TODO: Write usage instructions here
|
@@ -194,8 +194,11 @@ module Civo
|
|
194
194
|
return
|
195
195
|
end
|
196
196
|
|
197
|
+
@log ||= "None found"
|
198
|
+
@output ||= "None found"
|
199
|
+
|
197
200
|
data = {
|
198
|
-
values: { log:
|
201
|
+
values: { log: @log[0, 65535], output: @output, output_length: @output.length, status: @status || "-", ms_taken: @time_taken.to_i},
|
199
202
|
tags: { url: request.fullpath, method: request.request_method, app: app_name },
|
200
203
|
timestamp: (Time.now.to_r * 1000).to_i
|
201
204
|
}
|
data/lib/civo/logger/version.rb
CHANGED