Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Standard output from External tasks
Bowker
TS 6.5
Windows
Where does "standard output" go for an external task?
If I put a "print" statement in an external task's perl code, where does that output go?
And since I'm asking - what about any "system error messages" like "file not found" if the perl script being executed doesn't exist?
Dan
Dan Bowker
Northern Trust
Web Publishing Technology
Find more posts tagged with
Comments
Migrateduser
if you don't do the 2>&1 redirect, the error messages end up in iwtrace.log...they'll be the entries without a date/timestamp leader...
haven't done a print statement in an external task other than when I expected to see it on the console, so this is an educated guess, but I'd say it should end up in iwtrace.log as well...
cheers,
-Rori
Bill Klish
I would recommend using a more controlled logging/debugging framework like log4perl instead of relying on just using the print statement. This will make your code much easier to debug when needed without requiring any change of code. log4perl works just like log4j and has many powerful features, all controlled via a properties like file.
Let me know if you want more information, but it is fairly easy to put in place.
Adam Stoller
Or - role your own logging module, as we did - which provides timestamps, module-or-file and line number where call came from, job/task information if available, and the logging message (potentially prefaced with "DEBUG", "INFO", "WARNING", or "ERROR" - depending on which call you make).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Johnny
If you are on 6.x don't bother rolling your own unless you already have created one.
Log4Perl is a very complete tool with many options for log formats and logging mechanisms EG, automatic log rotation, even logging directly to a db if needed.
It's a one stop shop that can be used in a very bare bones format and also handled more complicated situations.
It currently ships with 6.x
John Cuiuli