Redirect RAD console to a file

How can I redirect RAD console output to a file?
We have numerous System.out statements and its a huge task to replace that in every occurence to a file.write().
Is there a simple way where (by some settings may be) we can redirect the console output to a file.

I don't see anything in the obvious place (Window, Preferences, Run/Debug, Console). But what's the point? RAD is just a development environment.
I don't think you should replace all your System.out statements by writing to a file either. I think you should replace them all by calls to a logging system like log4j. In the interim there's the System.setOut and System.setErr methods you could use, but I would still recommend refactoring to use the logging system.

Similar Messages

  • How to redirect console to a file?

    I'm running WLS811 on RH9 and have it starting automatically via init.d with
    the following line
    daemon ./startWebLogic.sh &
    Everything is going great, except the console is logged to the
    /var/log/boot.log file, along with all the other server stuff. Can I
    redirect the console to a file inside of my domain instead?
    I tried putting a <Log Filename="server.log"/> in my config.xml but that
    only put the server startup stuff in there, not the
    System.err.println("something here"); stuff.
    Any suggestions? Much appreciated, thanks.

    Try this,
    edit your startWeblogic.cmd and in the almost final line, the one that starts
    weblogic:
    "%JAVA_HOME%\bin\java -hotspot ...."
    add this at the end of that line:
    " 1>exit1.txt 2>exit2.txt"
    and restart weblogic. It should create at least exit1.txt with everything that
    appears in the console, including errors.
    Hope this helps
    dn <[email protected]> wrote:
    Hey Flip
    I was searching the forum for this and ended up on this thread.
    YOu did this on UNix right .
    Any idea how to make it work in Windows
    I tried startweblogic > log.txt , but the System.err or System.out is
    still coming up in the command console
    TIA
    Flip wrote:
    Howdy. With the help of a guru, I was able to get it to work. I tookout
    the 'daemon' commnd and put '>> ./server.log' before the & and allis good
    now. Thanks.
    "Flip" <[remove][email protected]> wrote in message
    news:3fc6241b$[email protected]..
    I'm running WLS811 on RH9 and have it starting automatically via init.dwith
    the following line
    daemon ./startWebLogic.sh &
    Everything is going great, except the console is logged to the
    /var/log/boot.log file, along with all the other server stuff. Can
    I
    redirect the console to a file inside of my domain instead?
    I tried putting a <Log Filename="server.log"/> in my config.xml butthat
    only put the server startup stuff in there, not the
    System.err.println("something here"); stuff.
    Any suggestions? Much appreciated, thanks.

  • Can Page Redirect affect caching of .SWZ files?

    Can Page Redirect affect caching of .SWZ files?
    I have two servers:
    Server 1: works perfect it creates cache on client machine (.swz and .heu files) and uses the cache (I can see the change in the .heu files)
    Server 2: is not able to create cache but is able to read the .heu files (I can see the change in the .heu files) from the client machine.
    What could be the issue that server 2 is not able to write .swz files on the client. I have the .swz MIME types on both the servers.
    thanks

    Do you maybe need a crossdomain.xml file on server 2?<br /><br />Matt<br /><br /><br />On 11/6/08 5:48 PM, "alex_stewart" <[email protected]> wrote:<br /><br />A new discussion was started by alex_stewart in<br /><br />Developers --<br />  Can Page Redirect affect caching of .SWZ files?<br /><br />Can Page Redirect affect caching of .SWZ files?<br />I have two servers:<br />Server 1: works perfect it creates cache on client machine (.swz and .heu files) and uses the cache (I can see the change in the .heu files)<br /><br />Server 2: is not able to create cache but is able to read the .heu files (I can see the change in the .heu files) from the client machine.<br /><br />What could be the issue that server 2 is not able to write .swz files on the client. I have the .swz MIME types on both the servers.<br /><br />thanks<br /><br />________________________________<br />View/reply at Can Page Redirect affect caching of .SWZ files? <a href=http://www.adobeforums.com/webx?13@@.59b6f554><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b6f554!folder=.3c060fa3>  form to cancel your email subscription.

  • Does sendRedirect () redirect control to an exe file?

    Hi Friends,
    When i was working with MVC pattern, i had one doubt in sendRedirect() method.I use this method only to redirect the control to a jsp or servlet files... I want to know whether it redirects control to any other files like html,txt,exe etc., if it is not possible means what about RequestDispatcher method on this issue.... Please clarify me and let me know some url's for better tutorials.....

    hi,
    Am not sure in MVC, but if you use this in jsp
    <%
    response.sendRedirect("filename.exe");
    %>it will popup to download.

  • Redirect SM50 output on unix file

    Hello,
    how can we execute daily SM50 daily and redirect html output on unix file?
    I Tried SE38, execute SM50 succefully, but no way to redirect output of this transaction on a unix file ?
    Thanks in advance.

    Hi majda,
    Hope you are doing good.
    Maybe check /nSM49 and create a OS command using ">>" operator Divyanshu mentioned:
    Restrict Authorizations for Executing External Commands - SAP NetWeaver Application Server ABAP Security Guide - SAP Lib…
    Thank you!
    Kind Regards,
    Hemanth
    SAP AGS

  • How can I save the java console to a file in JDK 1.5

    There was a option in the java webstart perefernce before JDK 1.4.....For some reason, i can not find it any more in 1.5..... :(

    Thanks for your suggetion, but sometimes it is pretty difficult add my own stream into a exiting large project, especially the source of some jar file are not available......
    Also is there any suggestion on how to redirect the System.out and System.err for a web start app......
    Another quick question, would you please tell me how i can enlarge the console buffer please?......
    Thx in advance

  • Redirect trace logs to a file

    We have enabled tracing by setting it in the web.xml. But the trace logs show up
    on the console. I want it to be redirected to a file. How can this be done?
    Thanks,
    Arthi

    Not sure what you mean by tracing can you pase in the setting?
    If you mean when you call
    Servet.log("foo") that this goes to the WLS log, then this is our default
    behavior that you cannot change, we are looking very hard at expanding
    logging configuration for our next release.
    cheers
    mbg
    "Artthi J" <[email protected]> wrote in message
    news:3ef36e5f$[email protected]..
    >
    We have enabled tracing by setting it in the web.xml. But the trace logsshow up
    on the console. I want it to be redirected to a file. How can this bedone?
    >
    Thanks,
    Arthi

  • Write console output to file

    Hi!
    I am trying to get powershell to write the results of a query to a txt file. It creates the text file, but its blank everytime
    heres my code:
    Clear-Host
    $a = Get-Content "d:\server_names2.txt"
    foreach ($server in $a)
    foreach ($Service in (Get-Service -ComputerName $server -name "SQLBrowser"))
    Get-WmiObject Win32_Service -ComputerName $server | where {($_.name -like "*SQLBrowser*")
    $mode = select StartMode}
    Write-host $server $Service.startmode $mode | Out-File c:\test.txt
    any ideas what im fdoing wrong?
    Thanks,
    Zoe

    You can simplify that code quite a bit.  Try this:
    $serverList = Get-Content "D:\server_names2.txt"
    Get-WmiObject Win32_Service -ComputerName $serverList -Filter 'Name LIKE "%SQLBrowser%"' |
    Select-Object @{ Name = 'ComputerName'; Expression = { $_.__SERVER } }, StartMode |
    Out-File c:\test.txt
    On a side note, Out-File will display the data just as it would be shown at the console (in this case, in a table). You may prefer something like Export-Csv, if you intend to read this data later with a program or another script.

  • How to redirect CELLCLI output to text file

    Hi,
    I would like to redicrect the output of the cellcli command to a text file .
    For example , how to redirect the output of this command to a text file on /tmp
    CellCLI> list metrichistory where objectType = 'CELL' -
    and name = 'CL_TEMP'Thanks

    cellcli has spooling capabilities similar to sqlplus:
    CellCLI> help spool
      Usage:  SPO[OL] [<filename> [ CRE[ATE] | REP[LACE] | APP[END]] | OFF ]
      Purpose: SPOOL <filename>: Direct the results to the file <filename>.
               SPOOL OFF: Turn off the spooling.
               SPOOL: Check the current spooling status.
      Arguments:
        <filename>: The filename where the results will be output.
      Options:
        [APPEND]: If the filename already exists, the following output will
                  be appended to the file. Without this option, the existing file
                  contents will be replaced.
        [CREATE]: If the filename already exists, an error is reported.
        [REPLACE]: If the filename already exists, the contents will be
                  replaced.  This is the default, when no option is provided.
      Examples:
        spool myfile
        spool myfile append
        spool off
        spoolBut if you are trying to script it, it would be easier to just run it command line:
    # cellcli -e "list metrichistory where objectType = 'CELL' and name = 'CL_TEMP'" > /tmp/CL_TEMP.txtAlso look into dcli which allows you to run cellcli commands on one or more cells from a compute node.
    Good luck.

  • Redirecting XSLT output to multiple files

    Hi,
    I am trying to redirect the output of the XSLT into multiple files using
    <xsl:variable name="filename" select="concat(@id,'.xml')" />
    <redirect:write select="$filename">
    </redirect:write>I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
    Can you please tell me if this can be done in someway ?

    Aravinda wrote:
    I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
    Can you please tell me if this can be done in someway ?You + setParameter + method of your Transformer in java code to set parameters. like below:
    transformer.setParameter("message1", "This is my message to XSLT from Java Class.");
    transformer.setParameter("message2", "Hello XSLT how are you?");
    . . .You can retrieve above parameters in global parameters/variables(must be as child of xsl:stylesheet element in xslt) defined in xslt like below:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:param name="message1"></xsl:param>
         <xsl:variable name="message2"></xsl:variable>
         <xsl:template match="/">
              <xsl:value-of select="$message1"/>     // retrieving message1
              <xsl:value-of select="$message2"/>     // retrieving message2
              <xsl:value-of select="concat($message1,$message2)"/>     // performing concat on message1 and message2
         </xsl:template>
    </xsl:stylesheet>*Cheers
    TYPUROHIT*
    (Tejas Purohit)

  • Screen Sharing suddenly fails with "Communication Error" in console log. File sharing works fine. Thoughts?

    I have been using Lion provided Screen Sharing for months without incident.  Suddenly (I do not believe there was an intervening o/s update), it will not connect.  I get a "Connection Error" dialog after a minute or two.  The console log shows the same thing w/o any useful info.  I can share files with the target mac fine and run time machine without error.  Any ideas on what's up?
    Thanks

    Check the host property configured in KM URL generator service.
    Navigate to
    System Administration -> System Configuration -> Knowledge Management -> Content Management -> Global Services -> (switch to advanced mode) ->URL generator Service -> Host
    You should use the fully qualified host name and port.
    Regards,
    Prasanna Krishnamurthy

  • Redirect all logs e trace files.

    How can I redirect all the logs and trace files in the WebAS Java to a different directory?
    Tks for the help.
    José Simões

    Hi Jose,
                       You can't change the standard directory. So you better look for an work around.
    Regards,
    Hari.

  • Redirect code to different css file for mobiles

    i need some code that i can use to detect mobiles and then change to a css file for the page so it looks good on mobiles. ive been looking around and i can only find redirect codes to mobile versions on websites and i dont want that, i want to stay on the same page but just use a different css file. Thanks to anyone that can help me.

    What you want are CSS Media Queries.  They can be incorporated into your main CSS file like so.  Feel free to adjust breakpoint values as required.
    /* Special Styles for Mobiles. */
    @media only screen and (max-width: 480px) {
        body { font-size: 75% }
    /* Special Styles for Tablets */
    @media only screen and (min-width: 481px) {
         body { font-size: 100%; }
    /* Special Styles for Desktops */
    @media only screen and (min-width: 1025px) {
         body { font-size: 135%; }
    Nancy O.

  • Stop or Redirect RTCP Multicast via SDP Files (Help!)

    I've got a piece of hardware (Optibase MM400 encoder) that generates both an SDP file and a multicast RTP video stream. (I've configured it to omit the audio stream.) The SDP looks like this:
    (Note: I've obscured some of the IPs with letters)
    v=0
    o=INGESTSERVERA7 723 75540417 IN IP4 AAA.BBB.239.243
    s=MM-400
    t=0 0
    a=x-authentication:A989B14958B5089A940C1201
    a=isma-compliance:1,1,1
    a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoILAE8BAQABAQOBJgABQIhkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBVWtCUndVZkEwTUE0QVFFT3lBUkFGQUFBQURhd0FBQTJzQUZMQUFBQWJBQkFBQUJzbFZWQUFBQnRRa0FBQUVCQUFBQklRQ080QUFnSXlBQWFBQkNnRWdBOVFXRURoUmpCZ0VEBA0BBQAAyAAAAAAAAAAABgkBAAAAAAAAAAADWQACQDZkYXRhOmFwcGxpY2F0aW9uL21wZWc0LWJpZnMtYXU7YmFzZTY0LHdCQVNZUVNJVUVVRlB3QT0EEgINAAAUAAAAAAAAAAAFAwAAQAYJAQAAAAAAAAAA"
    m=video 11110 RTP/AVP 96
    c=IN IP4 239.1.7.193/127
    a=rtpmap:96 MP4V-ES/90000
    a=fmtp:96 profile-level-id=1; config=000001B001000001B25555000001B5090000010100000121008EE00020232000680042804800F505840E1463
    a=mpeg4-esid:224
    The problem is that both VLC and QuickTime spit out multicast packets in response to the streaming video--e.g. RTCP. (I'll explain why this is a problem in a followup message.)
    I tried using the RTCP bandwidth specifiers (b=RR: and b=RS:) in both the session and media contexts, but it they didn't affect the RTCP packet rate (one every five seconds).
    Here's how I used them in the session context:
    v=0
    o=INGESTSERVERA7 723 75540417 IN IP4 AAA.BBB.239.243
    s=MM-400
    b=RR:0
    b=RS:0
    t=0 0
    a=x-authentication:A989B14958B5089A940C1201
    a=isma-compliance:1,1,1
    a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoILAE8BAQABAQOBJgABQIhkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBVWtCUndVZkEwTUE0QVFFT3lBUkFGQUFBQURhd0FBQTJzQUZMQUFBQWJBQkFBQUJzbFZWQUFBQnRRa0FBQUVCQUFBQklRQ080QUFnSXlBQWFBQkNnRWdBOVFXRURoUmpCZ0VEBA0BBQAAyAAAAAAAAAAABgkBAAAAAAAAAAADWQACQDZkYXRhOmFwcGxpY2F0aW9uL21wZWc0LWJpZnMtYXU7YmFzZTY0LHdCQVNZUVNJVUVVRlB3QT0EEgINAAAUAAAAAAAAAAAFAwAAQAYJAQAAAAAAAAAA"
    Here's how I used them in the media context:
    m=video 11110 RTP/AVP 96
    c=IN IP4 239.1.7.193/127
    b=RR:0
    b=RS:0
    a=rtpmap:96 MP4V-ES/90000
    a=fmtp:96 profile-level-id=1; config=000001B001000001B25555000001B5090000010100000121008EE00020232000680042804800F505840E1463
    a=mpeg4-esid:224
    I also tried it once with the "b=AS:" value set to the total size of the media stream.
    Next, I tried to use the "a=rtcp:" attribute to redirect the packets to a different IP (unicast) and then just a different port.
    Here's how I used it in the session context:
    v=0
    o=INGESTSERVERA7 723 75540417 IN IP4 AAA.BBB.239.243
    s=MM-400
    t=0 0
    a=rtcp:11223 IN IP4 10.10.10.10
    a=x-authentication:A989B14958B5089A940C1201
    a=isma-compliance:1,1,1
    a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoILAE8BAQABAQOBJgABQIhkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBVWtCUndVZkEwTUE0QVFFT3lBUkFGQUFBQURhd0FBQTJzQUZMQUFBQWJBQkFBQUJzbFZWQUFBQnRRa0FBQUVCQUFBQklRQ080QUFnSXlBQWFBQkNnRWdBOVFXRURoUmpCZ0VEBA0BBQAAyAAAAAAAAAAABgkBAAAAAAAAAAADWQACQDZkYXRhOmFwcGxpY2F0aW9uL21wZWc0LWJpZnMtYXU7YmFzZTY0LHdCQVNZUVNJVUVVRlB3QT0EEgINAAAUAAAAAAAAAAAFAwAAQAYJAQAAAAAAAAAA"
    ...then just thet port...
    a=rtcp:11223
    This didn't affect the RTCP packets from VLC or QuickTime one bit, while changing the media port did have an effect--proving that the SDP files were being read.
    On last thing I tried was the "a=rtcp:unicast reflection" attribute, hoping it would return traffic to a unicast address that I could blackhole.
    Here's how I used it:
    v=0
    o=INGESTSERVERA7 723 75540417 IN IP4 AAA.BBB.239.243
    s=MM-400
    t=0 0
    a=rtcp:a=rtcp:unicast reflection
    a=rtcp:11223 IN IP4 10.10.10.10
    a=x-authentication:A989B14958B5089A940C1201
    a=isma-compliance:1,1,1
    a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoILAE8BAQABAQOBJgABQIhkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBVWtCUndVZkEwTUE0QVFFT3lBUkFGQUFBQURhd0FBQTJzQUZMQUFBQWJBQkFBQUJzbFZWQUFBQnRRa0FBQUVCQUFBQklRQ080QUFnSXlBQWFBQkNnRWdBOVFXRURoUmpCZ0VEBA0BBQAAyAAAAAAAAAAABgkBAAAAAAAAAAADWQACQDZkYXRhOmFwcGxpY2F0aW9uL21wZWc0LWJpZnMtYXU7YmFzZTY0LHdCQVNZUVNJVUVVRlB3QT0EEgINAAAUAAAAAAAAAAAFAwAAQAYJAQAAAAAAAAAA"
    ...and still, the VLC/QuickTime Player clients continued to spit out RTCP multicast traffic on the port (11111) following the media port (11110).
    Anyone have any ideas what I'm doing wrong? Surely VLC and/or QuickTime has implemented a solution.
    Note, this problem was identified in the QuickTime forums a few times, but never addressed:
    * http://discussions.apple.com/thread.jspa?messageID=8020690&#8020690
    * http://discussions.apple.com/thread.jspa?messageID=2543521&#2543521
    * http://lists.apple.com/archives/streaming-server-dev/2003/Jul/msg00037.html
    One last note: I successfully delivered the SDP file as a local file, a web file, and wrapped within a SAP multicast.. all with the same results.

    For the purposes of completeness, and evidence that I've been digging for the answer, here's some overview and reference information.
    Intro (skip if you know about RTCP and its downsides)
    For people just running into this problem. VLC and QuickTime Player send out a multicast packet every 5 seconds in response to multicast RTP stream(s) identified via SDP files. These packets are "RTCP", which is sent by RTP clients to report on the quality of the streams from the client perspective.
    The problem is, these packets can overwhelm a system with thousands of clients:
    * All client packets have to be delivered to all other clients (huge complexity)
    * Routers have to maintain giant lists of the multicast senders
    * Many systems are only efficient for single-source multicast traffic (think satellites)
    Note: As I understand it, the RTCP multicast packets are sent to all clients so that each client can throttle the overall RTCP bandwidth to reasonable levels. While this is clever solution, it doesn't reduce the number of multicast senders--just the frequency of their packets.
    Possible Solutions
    I've read through a lot of the SDP/RTP specs. It seems like the preferred (by the spec authors) solution is to redirect the RTCP traffic to a unicast location and then rebroadcast the RTCP traffic from the same single source.
    This spec mentions the "rtcp-unicast" option:
    Draft Spec: RTCP with Unicast Feedback (http://tools.ietf.org/html/draft-ietf-avt-rtcpssm-17)
    This spec specifies means of directing RTCP traffic to specific ports/IPs (presumably unicast included):
    RFC 3605: RTCP attribute in SDP (http://www.packetizer.com/rfc/rfc3605/)
    Another potential solution (ideal in my case), is to pinch the bandwidth for RTCP traffic down to zero, effectively stopping all RTCP traffic from the clients.
    This spec specifies the "b=AS:", "b=RS:", and "b=RR:" bandwidth modifiers:
    RFC 3556: Session Description Protocol (SDP) Bandwidth Modifier (http://www.faqs.org/rfcs/rfc3556.html)
    Other Specs
    RFC 4566: SDP: Session Description Protocol (http://www.ietf.org/rfc/rfc4566)
    * Replaced RFC 2327: SDP: Session Description Protocol (http://www.ietf.org/rfc/rfc4566)
    RFC 3550: RTP: A Transport Protocol for Real-Time Applications (http://www.ietf.org/rfc/rfc3550.txt)
    * Replaced RFC 1889: RTP: A Transport Protocol for Real-Time Applications (http://www.rfc-editor.org/rfc/rfc1889.txt)
    RFC 3890: A Transport Independent Bandwidth Modifier for the Session Description Protocol (SDP)
    RFC 4585: Extended RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/AVPF)
    RFC 1890: RTP Profile for Audio and Video Conferences with Minimal Control
    Question: Which RFC(s) is QuickTime compliant with?

  • How to redirect sop statements to a file?

    Hi All:
    I have few System.out.println() statements in my code. I am using Jdeveloper 9.0.3. I want to redirect all these log statements to a file. Is this possible? If yes, how?
    Thanks,
    Viral

    please reply.. any ideas..?

Maybe you are looking for