GunnyLog 1.0.1 → 1.0.2
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 +4 -4
- data/lib/GunnyLog.rb +9 -6
- 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: 9d78492939a8c7c6f91db7d2c08812464637bafa
|
4
|
+
data.tar.gz: 2ab0049b6a262bb5a261da6f7f8529671dac7f1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e8bd6bbe3560c687b65a5c3e2fd09d5c2c130a52f29db43ed2e70d7c5546b1f7c2853422fd16e53ef31ae5172ddaa74968ebd7297a16b864d54cb2b441e8904
|
7
|
+
data.tar.gz: 4fb2adbfac7a78993fd58a4a5cf3dc9519d733c8606191a5dc7e43f8382466891d430214bb17b5c8584e22dbf649078d0923cbad95dab44740c1fd194bfd2fb9
|
data/lib/GunnyLog.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
# GunnyLog
|
2
|
-
# GunnyLogFile logs messages to a file
|
1
|
+
# GunnyLog and GunnyLogFile classes
|
3
2
|
require 'singleton'
|
4
3
|
require 'date'
|
5
4
|
|
@@ -9,23 +8,26 @@ class GunnyLog
|
|
9
8
|
|
10
9
|
include Singleton
|
11
10
|
|
11
|
+
# logging off and on flag
|
12
12
|
class << self;
|
13
13
|
attr_accessor :onoffswitch
|
14
14
|
end
|
15
15
|
@onoffswitch = true
|
16
16
|
|
17
|
+
# location message was logged from
|
17
18
|
class << self;
|
18
19
|
attr_accessor :location
|
19
20
|
end
|
20
21
|
@location = 'MainMethod'
|
21
22
|
|
22
|
-
|
23
|
-
# @param [bool] switch
|
23
|
+
# set logging on and off
|
24
|
+
# @param [bool] switch
|
24
25
|
def set_switch(switch)
|
25
26
|
@onoffswitch = switch
|
26
27
|
end
|
27
28
|
|
28
|
-
#
|
29
|
+
# set location message was logged from
|
30
|
+
# @param [string] name
|
29
31
|
def set_location(name)
|
30
32
|
@location = name
|
31
33
|
end
|
@@ -72,11 +74,12 @@ class GunnyLog
|
|
72
74
|
end
|
73
75
|
|
74
76
|
end
|
75
|
-
|
77
|
+
|
76
78
|
|
77
79
|
# GunnyLogFile logs messages to a file
|
78
80
|
class GunnyLogFile < GunnyLog
|
79
81
|
|
82
|
+
# is file open flag
|
80
83
|
class << self;
|
81
84
|
attr_accessor :_is_file_open
|
82
85
|
end
|