> -----Urspr�ngliche Nachricht-----
> Von: Eung-ju Park [mailto:[EMAIL PROTECTED]] 
> Gesendet: Montag, 25. Februar 2002 13:22
> An: Avalon Developers List
> Betreff: Re: redirect log to console
> 
> 
> Version 1.1 LogManager is wrapper for 
> excalibur.logger.LogKitLoggerManager.
> Configuration scheme described in excalibur's javadoc.
> Hack excalibur if you want more things. ;-)

As I have said I got the right syntax ;) I don't want more things ;) I
just want excalibur.logger.LogKitLoggerManager to throw a readable error
when a factory type not defined in <factories> is used in the <targets>
section. Here an example:


        <logs version="1.1">
                <factories>
                        <factory
                                type="console"
        
class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory">
                        </factory>
<!--                    <factory
                                type="file"
        
class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory">
                        </factory>-->
                </factories>

                <categories>
                        <category name="" log-level="DEBUG">
                                <log-target id-ref="default.console"/>
                                <log-target id-ref="default.file"/>
                        </category>
      <category name="objectstorage" log-level="INFO">
                                <log-target id-ref="objectstorage"/>
      </category>
                </categories>

                <targets>
                        <console id="default.console">
                                <stream>System.out</stream>
                                <format
type="pattern"><![CDATA[%7.7{priority} %19.19{time:yyyy-MM-dd'
'HH:mm:ss.SSS} [%{category}]
(%{context}): %{message}\n%{throwable}]]></format>
                        </console>
<!-- uses missing factory type "file" -->
                        <file id="default.file">
                                <filename>simpleserver.log</filename>
                                <format
type="pattern"><![CDATA[%7.7{priority} %19.19{time:yyyy-MM-dd'
'HH:mm:ss.SSS} [%{category}]
(%{context}): %{message}\n%{throwable}]]></format>
                                <append>false</append>
                        </file>

                        <file id="objectstorage">
                                <filename>objectstorage.log</filename>
                                <format
type="pattern"><![CDATA[%7.7{priority} %19.19{time:yyyy-MM-dd'
'HH:mm:ss.SSS} [{category}]
(%{context}): %{message}\n%{throwable}]]></format>
                                <append>true|false</append>
                        </file>
                </targets>
        </logs>


I made the mistake and runned phoenix. Here is the output:


There was an uncaught exception:
---------------------------------------------------------
--- Message ---
null
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:183)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:477)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:471)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:459)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:449)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:189)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:141)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:127)

        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:85)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:88)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:44)
---------------------------------------------------------
The log file may contain further details of error.
Please check the configuration files and restart Phoenix.
If the problem persists, contact the Avalon project.  See
http://jakarta.apache.org/avalon for more information.
Shutting down Phoenix.


> 
> ----- Original Message -----
> From: "Emperor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 25, 2002 9:10 PM
> Subject: WG: redirect log to console
> 
> 
> Ok i got the syntax. But it seems that the log config loader 
> doesn't recognize undefined target types (when not declared 
> in factories).
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to