This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 3158edf make logs visible to whimsy.local
3158edf is described below
commit 3158edf0356c62b9a0f7150f505a25f3dffcbaac
Author: Sam Ruby <[email protected]>
AuthorDate: Sun Dec 1 06:33:03 2019 -0500
make logs visible to whimsy.local
---
config/setupmymac | 4 ++++
lib/whimsy/logparser.rb | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/config/setupmymac b/config/setupmymac
index 26436d5..e3197c2 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -249,6 +249,10 @@ files.each do |file|
end
end
+if not File.exist? '/srv/whimsy/www/members/log'
+ run 'ln -s //var/log/apache2 /srv/whimsy/www/members/log'
+end
+
### Docker installation
if option == :docker
diff --git a/lib/whimsy/logparser.rb b/lib/whimsy/logparser.rb
index ebfa073..d47d50b 100755
--- a/lib/whimsy/logparser.rb
+++ b/lib/whimsy/logparser.rb
@@ -167,7 +167,7 @@ module LogParser
# @param d directory to scan for error.log*
# @return hash of arrays of interesting entries
def parse_error_logs(d = ERROR_LOG_DIR, logs = {})
- Dir[File.join(d, 'error.lo*')].each do |f|
+ Dir[File.join(d, 'error?lo*')].each do |f|
parse_error_log(f.untaint, logs)
end
return logs
@@ -212,7 +212,8 @@ module LogParser
def get_errors(current, dir: ERROR_LOG_DIR)
if current
logs = LogParser.parse_whimsy_error(File.join(dir, 'whimsy_error.log'))
- LogParser.parse_error_log(File.join(dir, 'error.log'), logs)
+ error_log = Dir[File.join(dir, 'error?log')].first
+ LogParser.parse_error_log(error_log, logs) if error_log
else
logs = LogParser.parse_whimsy_errors(dir)
LogParser.parse_error_logs(dir, logs)