serverengine 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Changelog +5 -0
- data/lib/serverengine/daemon_logger.rb +9 -0
- data/lib/serverengine/version.rb +1 -1
- data/spec/daemon_logger_spec.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTE3MmE3Y2NkZWFlY2VmNmFmYjc4ZTk1MWEzYTIyMDQwYjNkZDY0Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGExMjkzMDk3MjdjZjA5ZDBmM2U0OGM0YWViZjgxZWRlNTVmMjg4Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGY1NzhmY2Q2MDUzNzljNTVlYjcwNDQ3ZjBiYzQ3NWY4ZDA0MTQzYzViMTZi
|
10
|
+
YTVmNzhlNzIzM2RhOWVkNDZkMzFkNmRhODc0ZTBmMzM1MThkM2VhNTg2NjY0
|
11
|
+
YTZlMmFmNGJlMWMxMzBjNTRiNmU4MjQyZDdkY2U2NWUwZjdiNmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWJjOTljMWI5MTcxNzkwYzJjYmQxNWI3MTYwMTUzMTMxYzhhNjRlYzNlNjZl
|
14
|
+
NDYzYjJiZWJkNTQ3NTM2NzYzZmM5ZjRhNzRjMTVmMDNiMjJjNzkyNTE5MjIx
|
15
|
+
YmUwMjkwMDQ1ZTc0ZTQxMTY0NDBkYzY5NzE0MDc2ZDNmYWQ0NTk=
|
data/Changelog
CHANGED
@@ -19,6 +19,15 @@ module ServerEngine
|
|
19
19
|
|
20
20
|
require 'logger'
|
21
21
|
|
22
|
+
class ::Logger::LogDevice
|
23
|
+
def reopen!
|
24
|
+
if filename = @filename
|
25
|
+
@dev.reopen(filename, 'a')
|
26
|
+
@dev.sync = true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
22
31
|
class DaemonLogger < Logger
|
23
32
|
def initialize(logdev, config={})
|
24
33
|
@rotate_age = config[:log_rotate_age] || 5
|
data/lib/serverengine/version.rb
CHANGED
data/spec/daemon_logger_spec.rb
CHANGED
@@ -11,9 +11,13 @@ describe ServerEngine::DaemonLogger do
|
|
11
11
|
it 'reopen' do
|
12
12
|
subject.warn "ABCDEF"
|
13
13
|
File.open('tmp/se1.log', "w") {|f| }
|
14
|
-
subject.warn "test2"
|
15
14
|
|
15
|
+
subject.warn "test2"
|
16
16
|
File.read('tmp/se1.log').should_not =~ /ABCDEF/
|
17
|
+
|
18
|
+
subject.reopen!
|
19
|
+
subject.warn "test3"
|
20
|
+
File.read('tmp/se1.log').should =~ /test3/
|
17
21
|
end
|
18
22
|
|
19
23
|
it 'reset path' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sigdump
|