debugLogger 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/debugLogger.rb +32 -0
- metadata +43 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a397f6e55d18e11f2188b01a16d8fa7f4e91386c
|
4
|
+
data.tar.gz: a1ddad37a96e8b167dd7ed069d9859d5125befa4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2e2294a34e3bb5142342ec512c2c67826e4c9f5a0250edeea3a0252f0ab77c38ff368bca9aab019fcfc7bee51efc7cc41445ac7953ec1ff267855b2bd778244c
|
7
|
+
data.tar.gz: c99ac593c1a26563fa4093df2c8e78e25e737edf87745e5ba9a2feb82e753bf1461dfe8a05d240d00453a420d45be46d3a4b98c8e3a53bcf7aa72a819fd38c6e
|
data/lib/debugLogger.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
class DebugLog
|
5
|
+
include Singleton
|
6
|
+
def initialize
|
7
|
+
@log = File.open("mylog.txt", "a")
|
8
|
+
end
|
9
|
+
def log(information)
|
10
|
+
@log.puts(information)
|
11
|
+
@log.flush
|
12
|
+
end
|
13
|
+
def logInspect information, name=nil
|
14
|
+
@log.puts('=======================')
|
15
|
+
if name != nil
|
16
|
+
@log.puts("======== #{name} ========")
|
17
|
+
end
|
18
|
+
@log.puts(information.inspect)
|
19
|
+
@log.puts('----------------------------')
|
20
|
+
@log.flush
|
21
|
+
end
|
22
|
+
|
23
|
+
def logAsJson information, name=nil
|
24
|
+
@log.puts('=======================')
|
25
|
+
if name != nil
|
26
|
+
@log.puts("======== #{name} ========")
|
27
|
+
end
|
28
|
+
@log.puts(JSON.pretty_generate(information))
|
29
|
+
@log.puts('----------------------------')
|
30
|
+
@log.flush
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: debugLogger
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rajiv
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-12-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple logging gem for a faster debug control
|
14
|
+
email: ''
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/debugLogger.rb
|
20
|
+
homepage: http://rubygems.org/gems/debugLogger
|
21
|
+
licenses: []
|
22
|
+
metadata: {}
|
23
|
+
post_install_message:
|
24
|
+
rdoc_options: []
|
25
|
+
require_paths:
|
26
|
+
- lib
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '0'
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
requirements: []
|
38
|
+
rubyforge_project:
|
39
|
+
rubygems_version: 2.6.8
|
40
|
+
signing_key:
|
41
|
+
specification_version: 4
|
42
|
+
summary: A simple logging gem for a faster debug control
|
43
|
+
test_files: []
|