soar_auditing_format 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/soar_auditing_format/formatter.rb +3 -3
- data/lib/soar_auditing_format/version.rb +1 -1
- data/sanity/Gemfile +1 -1
- data/sanity/Gemfile.lock +15 -0
- data/sanity/sanity.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: cc7491a8a71f896ae24669bf6f693434cd620af1
|
4
|
+
data.tar.gz: a2c962138f3f3ada4fcf374f8ef4cf7270b7798e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d639095c3d878387fa39aef931662ebdc0b0876e2080469543f18461bf281e702e37415fbf14aa1baacbf6acffeb3295dfff66adfdd17836d3fcdc9c3027b54
|
7
|
+
data.tar.gz: a0c73401f111ddcbacf9eb04bf13923211999aa6c51824a78e6ea73b914918d1950fef621e352a739da809cd4b31a61290df88e41e04bf17c6c7afccdc03df71
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'time'
|
2
2
|
|
3
3
|
module SoarAuditingFormatter
|
4
|
-
FORMAT="%s,%s,%s,%s" unless defined? FORMAT; FORMAT.freeze
|
4
|
+
FORMAT="%s,%s,%s,%s,%s" unless defined? FORMAT; FORMAT.freeze
|
5
5
|
OPTIONAL_FIELD_FORMAT = "[%s:%s]" unless defined? OPTIONAL_FIELD_FORMAT; OPTIONAL_FIELD_FORMAT.freeze
|
6
6
|
|
7
7
|
class Formatter
|
8
|
-
def self.format(level, flow_id, timestamp, message)
|
8
|
+
def self.format(level, service_id, flow_id, timestamp, message)
|
9
9
|
times = Time.parse(timestamp.to_s).utc.iso8601(3)
|
10
|
-
sprintf(FORMAT, level, flow_id, times, message)
|
10
|
+
sprintf(FORMAT, level, service_id, flow_id, times, message)
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.optional_field_format(key, value)
|
data/sanity/Gemfile
CHANGED
data/sanity/Gemfile.lock
ADDED
data/sanity/sanity.rb
CHANGED
@@ -5,7 +5,7 @@ require 'securerandom'
|
|
5
5
|
class Main
|
6
6
|
def test_sanity
|
7
7
|
my_optional_field = SoarAuditingFormatter::Formatter.optional_field_format("somekey", "somevalue")
|
8
|
-
puts SoarAuditingFormatter::Formatter.format(:error,SecureRandom.hex(32),Time.now.utc.iso8601(3),"#{my_optional_field} message")
|
8
|
+
puts SoarAuditingFormatter::Formatter.format(:error,'my-service-identifier',SecureRandom.hex(32),Time.now.utc.iso8601(3),"#{my_optional_field} message")
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soar_auditing_format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Barney de Villiers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- sanity/.ruby-gemset
|
91
91
|
- sanity/.ruby-version
|
92
92
|
- sanity/Gemfile
|
93
|
+
- sanity/Gemfile.lock
|
93
94
|
- sanity/sanity.rb
|
94
95
|
- soar_auditing_format.gemspec
|
95
96
|
homepage: https://github.hetzner.co.za/hetznerZA/soar_auditing_format
|