You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Emperor <Da...@gmx.net> on 2002/02/24 19:30:07 UTC

redirect log to console

How can I redirect the log output to the console by editing the
environmment xml file?

Thx,

Nils


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AW: redirect log to console

Posted by Richard Wallace <rw...@a--i--m.com>.
Hello,

If you're on a *nix system just log to a file and use 'tail -f log' to
make the output appear on the console. 

On Mon, 2002-02-25 at 05:03, Emperor wrote:
> Thx, and how do I redirect the log both to console and file? How do I
> declare a log file in version 1.1?
> 
> > 
> > Opps. remove append, rotation element.
> > 
> > ----- Original Message -----
> > From: "Eung-ju Park" <co...@apache.org>
> > To: "Avalon Developers List" <av...@jakarta.apache.org>
> > Sent: Monday, February 25, 2002 9:28 AM
> > Subject: Re: redirect log to console
> > 
> > 
> > >
> > > ----- Original Message -----
> > > From: "Emperor" <Da...@gmx.net>
> > > To: <av...@jakarta.apache.org>
> > > Sent: Monday, February 25, 2002 3:30 AM
> > > Subject: redirect log to console
> > >
> > >
> > > > How can I redirect the log output to the console by editing the 
> > > > environmment xml file?
> > >
> > > Use 1.1 log configuration.
> > >
> > >   <logs version="1.1">
> > >     <factories>
> > >       <factory type="block"
> > >
> > > 
> > class="org.apache.avalon.excalibur.logger.factory.StreamTarget
> > Factory"/>
> > >     </factories>
> > >
> > >     <categories>
> > >       <category name="" log-level="INFO">
> > >         <log-target id-ref="default"/>
> > >       </category>
> > >     </categories>
> > >
> > >     <targets>
> > >       <block id="default">
> > >         <stream>System.out</stream>
> > >         <append>true</append>
> > >         <format 
> > > type="pattern"><![CDATA[%{time:yyyyMMddHHmmss}%11.11{priority}
> > > <<%{category}>>: %{message}\n%{throwable}]]></format>
> > >         <rotation type="unique" pattern="yyyyMMdd" suffix=".log">
> > >           <date>yyyyMMdd</date>
> > >         </rotation>
> > >       </block>
> > >     </targets>
> > >   </logs>
> > >
> > > >
> > > > Thx,
> > > >
> > > > Nils
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:avalon-dev-> unsubscribe@jakarta.apache.org>
> > For 
> > additional commands, 
> > e-mail: <ma...@jakarta.apache.org>
> > 
> > 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
Richard Wallace
AIM, Inc. (www.a--i--m.com)
Information Systems Consultants

"Providing New Technology,
     the Old-Fashioned Way"


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


AW: redirect log to console

Posted by Emperor <Da...@gmx.net>.
Thx, and how do I redirect the log both to console and file? How do I
declare a log file in version 1.1?

> 
> Opps. remove append, rotation element.
> 
> ----- Original Message -----
> From: "Eung-ju Park" <co...@apache.org>
> To: "Avalon Developers List" <av...@jakarta.apache.org>
> Sent: Monday, February 25, 2002 9:28 AM
> Subject: Re: redirect log to console
> 
> 
> >
> > ----- Original Message -----
> > From: "Emperor" <Da...@gmx.net>
> > To: <av...@jakarta.apache.org>
> > Sent: Monday, February 25, 2002 3:30 AM
> > Subject: redirect log to console
> >
> >
> > > How can I redirect the log output to the console by editing the 
> > > environmment xml file?
> >
> > Use 1.1 log configuration.
> >
> >   <logs version="1.1">
> >     <factories>
> >       <factory type="block"
> >
> > 
> class="org.apache.avalon.excalibur.logger.factory.StreamTarget
> Factory"/>
> >     </factories>
> >
> >     <categories>
> >       <category name="" log-level="INFO">
> >         <log-target id-ref="default"/>
> >       </category>
> >     </categories>
> >
> >     <targets>
> >       <block id="default">
> >         <stream>System.out</stream>
> >         <append>true</append>
> >         <format 
> > type="pattern"><![CDATA[%{time:yyyyMMddHHmmss}%11.11{priority}
> > <<%{category}>>: %{message}\n%{throwable}]]></format>
> >         <rotation type="unique" pattern="yyyyMMdd" suffix=".log">
> >           <date>yyyyMMdd</date>
> >         </rotation>
> >       </block>
> >     </targets>
> >   </logs>
> >
> > >
> > > Thx,
> > >
> > > Nils
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:avalon-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirect log to console

Posted by Eung-ju Park <co...@apache.org>.
Opps. remove append, rotation element.

----- Original Message -----
From: "Eung-ju Park" <co...@apache.org>
To: "Avalon Developers List" <av...@jakarta.apache.org>
Sent: Monday, February 25, 2002 9:28 AM
Subject: Re: redirect log to console


>
> ----- Original Message -----
> From: "Emperor" <Da...@gmx.net>
> To: <av...@jakarta.apache.org>
> Sent: Monday, February 25, 2002 3:30 AM
> Subject: redirect log to console
>
>
> > How can I redirect the log output to the console by editing the
> > environmment xml file?
>
> Use 1.1 log configuration.
>
>   <logs version="1.1">
>     <factories>
>       <factory type="block"
>
> class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/>
>     </factories>
>
>     <categories>
>       <category name="" log-level="INFO">
>         <log-target id-ref="default"/>
>       </category>
>     </categories>
>
>     <targets>
>       <block id="default">
>         <stream>System.out</stream>
>         <append>true</append>
>         <format
> type="pattern"><![CDATA[%{time:yyyyMMddHHmmss}%11.11{priority}
> <<%{category}>>: %{message}\n%{throwable}]]></format>
>         <rotation type="unique" pattern="yyyyMMdd" suffix=".log">
>           <date>yyyyMMdd</date>
>         </rotation>
>       </block>
>     </targets>
>   </logs>
>
> >
> > Thx,
> >
> > Nils
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirect log to console

Posted by Eung-ju Park <co...@apache.org>.
----- Original Message -----
From: "Emperor" <Da...@gmx.net>
To: <av...@jakarta.apache.org>
Sent: Monday, February 25, 2002 3:30 AM
Subject: redirect log to console


> How can I redirect the log output to the console by editing the
> environmment xml file?

Use 1.1 log configuration.

  <logs version="1.1">
    <factories>
      <factory type="block"

class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/>
    </factories>

    <categories>
      <category name="" log-level="INFO">
        <log-target id-ref="default"/>
      </category>
    </categories>

    <targets>
      <block id="default">
        <stream>System.out</stream>
        <append>true</append>
        <format
type="pattern"><![CDATA[%{time:yyyyMMddHHmmss}%11.11{priority}
<<%{category}>>: %{message}\n%{throwable}]]></format>
        <rotation type="unique" pattern="yyyyMMdd" suffix=".log">
          <date>yyyyMMdd</date>
        </rotation>
      </block>
    </targets>
  </logs>

>
> Thx,
>
> Nils
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: redirect log to console

Posted by Stephen McConnell <mc...@apache.org>.
Nils:

To redirect to console you would need to be able to declare 
the implementation logging target class in the environment.xml
file.  This is not currently possible based on the existing 
environment.xml spec - but is a very valid suggestion given the 
recent introduction of the agnostic logging framework.

Cheers, Steve.


> -----Original Message-----
> From: Emperor [mailto:DarkEmperor@gmx.net]
> Sent: Sunday, 24 February, 2002 19:30
> To: avalon-dev@jakarta.apache.org
> Subject: redirect log to console
> 
> 
> How can I redirect the log output to the console by editing the
> environmment xml file?
> 
> Thx,
> 
> Nils
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>