perception 0.3.15 → 0.3.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/perception/logging.rb +6 -8
- data/version.rb +1 -1
- metadata +1 -1
data/lib/perception/logging.rb
CHANGED
@@ -42,13 +42,11 @@ module Perception
|
|
42
42
|
smart_init if Drumherum.directory_main.empty?
|
43
43
|
logdir = File.expand_path(File.join(Drumherum.directory_main, 'log'))
|
44
44
|
# puts "logdir= #{logdir} size=#{logdir.split('/').size}"
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
logdir = "~/log"
|
51
|
-
end
|
45
|
+
end # if windows
|
46
|
+
if ( Drumherum.host_os != :windows || logdir.nil? || logdir.empty? || logdir == 'test/log' || logdir.split('/').size <= 2 )
|
47
|
+
require 'tmpdir'
|
48
|
+
logdir = Dir::tmpdir + '/log'
|
49
|
+
end
|
52
50
|
|
53
51
|
end # unless
|
54
52
|
|
@@ -62,7 +60,7 @@ module Perception
|
|
62
60
|
begin
|
63
61
|
# Dir erzeugen
|
64
62
|
unless File.exist?(logdir)
|
65
|
-
|
63
|
+
FileUtils.makedirs(logdir)
|
66
64
|
puts "\n\nSeeSession#logger: Directory #{logdir} created\n\n"
|
67
65
|
end
|
68
66
|
# File erzeugen
|
data/version.rb
CHANGED