From e327605249447380f579c4fd07b4f587a6c1560e Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Tue, 16 Aug 2011 09:10:45 -0400 Subject: [PATCH] Keep the logging output of the EDI translator by default There is valuable troubleshooting information there that is otherwise hard to find. This particularly matters when the output of an EDI Action/Trigger template (JEDI) doesn't successfully get translated to EDIFACT for nonobvious reasons. In production environments, you might instead pipe to logger so that you can collect output with syslog, rather than in a flat file. As long as output goes *somewhere.* Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Jason Etheridge --- Open-ILS/src/edi_translator/edi_webrick.bash | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/edi_translator/edi_webrick.bash b/Open-ILS/src/edi_translator/edi_webrick.bash index 732d50a0e1..9ecd731dc9 100755 --- a/Open-ILS/src/edi_translator/edi_webrick.bash +++ b/Open-ILS/src/edi_translator/edi_webrick.bash @@ -16,8 +16,12 @@ script='./edi_webrick.rb'; # This doesn't work? # export RUBYLIB=$lib +echo -n Starting translator in background with logging... + # This is necessary -echo export RUBYOPT=rubygems - export RUBYOPT=rubygems -echo ruby $script '&' - ruby $script & +export RUBYOPT=rubygems + +# Instead of logging to file, one could pipe to the logger command. +ruby $script --verbose >> /openils/var/log/edi_webrick.log 2>&1 & + +echo done. -- 2.11.0