Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 7.5.3 Logging Question

Shirley

Thanks we do include etc/jetty-logging.xml in our start.ini but it
doesn't seem to do what I expect? Which is put the std err and stout
to the error log? ( my jetty-logging.xml is below )  They way I'm
reading is that a new object with id "ServerLog" is created the setErr
and setOut calls that object. So it should write to that? I do see
etc/jetty-logging.xml in the command, when I do a ps.





<Configure id="Server" class="org.eclipse.jetty.server.Server">

    <New id="ServerLog" class="java.io.PrintStream">
      <Arg>
        <New class="org.eclipse.jetty.util.RolloverFileOutputStream">
          <Arg><Property name="jetty.logs"
default="./logs"/>/yyyy_mm_dd.stderrout.log</Arg>
          <Arg type="boolean">false</Arg>
          <Arg type="int">90</Arg>
          <Arg><Call class="java.util.TimeZone"
name="getTimeZone"><Arg>GMT</Arg></Call></Arg>
          <Get id="ServerLogName" name="datedFilename"/>
        </New>
      </Arg>
    </New>

    <Call class="org.eclipse.jetty.util.log.Log"
name="info"><Arg>Redirecting stderr/stdout to <Ref
id="ServerLogName"/></Arg></Call>
    <Call class="java.lang.System" name="setErr"><Arg><Ref
id="ServerLog"/></Arg></Call>
    <Call class="java.lang.System" name="setOut"><Arg><Ref
id="ServerLog"/></Arg></Call>

</Configure>


On Tue, Nov 1, 2011 at 1:16 PM, Shirley Boulay <boulay@xxxxxxxxxxx> wrote:
> Hello Len,
>
> Try this:
>
> You can use etc/jetty-logging.xml to take all System.out and System.err
> output (from any source) and route it to a rolling log file. To do so,
> include etc/jetty-logging.xml on Jetty startup.
>
> java -jar start.jar etc/jetty-logging.xml
>
> Regards,
> Shirley
>
> On Tue, Nov 1, 2011 at 12:49 PM, Leonard Smith <lrsmith@xxxxxxxxx> wrote:
>>
>> I am running a basic install of Jetty 7.5.3 with Solr. I've set
>> JETTY_HOME and I'm seeing all my solr logs going to
>> $JETTY_HOME/start.log
>> I've been trying to find where that is set, and more importantly
>> trying to set it so the file will roll, like the request log. I've
>> done some quick google searches and looked at the configs, but I'm not
>> finding it.
>>
>> Any pointers or suggestions on how to get that file to role, or if I
>> have to move the solr logging from start.log to another file that can
>> roll, daily, would be appreciated.
>>
>> Thanks
>> Len
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>


Back to the top