Another option would be to use `tee` to send everything both places. 
I believe this is the syntax you'd want, but don't quote me on that.

eval $CFSTART 2>&1 | tee -a $CF_DIR/logs/cfserver.log

You could, of course, combine the two techniques so that you get
whatever you want in each place (both to console, but only erors to
the log, for example).  Tee's needed because it lets you send a single
output stream to two places.  And like all good unix utilities, can be
stacked on top of itself:

echo "hello, world!" | tee -a /var/log/messages | tee ~/log | tee /tmp/junk

cheers,
barneyb

On 1/25/06, Ken Dunnington <[EMAIL PROTECTED]> wrote:
> When I was running MX 6 and 7.0 on my OS X box, I would usually launch CF in
> a terminal window and leave that window open so I could see the various
> status messages, flash gateway notices and trace outputs in realtime. This
> saved me the effort of combing through a 5,000+ line error log  and was in
> fact the only way to see trace messages (that I knew of) if interfacing with
> Flash. Now, in 7.0.1, launching CF either though the
> ColdFusionLauncher.appor the /bin/coldfusion shell script will by
> default direct all those message
> to cfserver.log. That's all well and good, but debugging a Flash Remoting
> gateway by watching your traces as they occur is pretty handy, so I set out
> today to figure out how to get CF to send its output to console. Turns out
> it's quite easy.
>
> If you are doing development on your machine, and don't care about having a
> hard copy of your server startup and shutdown messages then edit a copy of
> /Applications/ColdFusionMX7/bin/coldfusion and change line 68 from this:
>
> eval $CFSTART >> $CF_DIR/logs/cfserver.log 2>&1
>
> To this:
>
> eval $CFSTART 2>>$CF_DIR/logs/cfserver.log
>
> This will allow the server's output to go to your screen, and send server
> error messages to cfserver.log. All other messages (trace, flash,
> application etc.) still go to their respective log files. And since the
> CFSTART variable already sets CF to run as a background process, you'll be
> handed back control in the Terminal window, so you can continue to do other
> things (as long as you don't mind CF popping up the occasional message.)
> This does technically work for the launcher app, although it confuses it
> somewhat, since it's expecting a proper exit. You won't be able to click on
> the buttons, so I wouldn't really recommend using it. I'd love to see the
> ability to use ColdFusionLauncher.app as a console monitor in the future,
> though! Also keep in mind that if you close the Terminal window, you won't
> see the messages anymore. Obviously, this is meant for development servers.
> :)
>
> Hope someone else finds this useful!
>
> - Ken

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230452
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to