WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

No log targets configured for the root logger

View: New views
2 Messages — Rating Filter:   Alert me  

No log targets configured for the root logger

by Mike Dickson :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

 

Any ideas on what is up given the following error and logkit.xconf? 

 

Error:

 

org.apache.avalon.framework.configuration.ConfigurationException: No log targets configured for the root logger.
    at org.apache.avalon.excalibur.logger.LogKitLoggerManager.setupLoggers(LogKitLoggerManager.java:531)
    at org.apache.avalon.excalibur.logger.LogKitLoggerManager.configure(LogKitLoggerManager.java:407)
    at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:240)
    at org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:826)
    at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:311)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:888)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:776)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3363)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3586)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

 

 

logkit.xconf

 

<?xml version="1.0"?>

<logkit>
  <factories>
    <factory type="priority-filter" class="org.apache.avalon.excalibur.logger.factory.PriorityFilterTargetFactory"/>
    <factory type="servlet" class="org.apache.avalon.excalibur.logger.factory.ServletTargetFactory"/>
    <factory type="cocoon" class="org.apache.cocoon.util.log.CocoonTargetFactory"/>
    <factory type="lf5" class="org.apache.avalon.excalibur.logger.factory.LF5TargetFactory"/>
  </factories>

  <targets>

    <!-- To enable the LogFactor5 graphical logkit browser, replace the cocoon factory
         below with the following.
    <lf5 id="core"/>
    -->

    <cocoon id="core">
      <filename>${context-root}/WEB-INF/logs/core.log</filename>
      <format type="cocoon">
        %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
      </format>
      <!--
        append=false: Will override existing log files on Cocoon startup
        append=true: Will append to the existing log files
      -->
      <append>false</append>
      <!--
        rotation: allows you to rotate log files one they meet certain
                  criteria. In example below, files are rotated once they
                  are one hour old or bigger than 100 Mb.

      <rotation type="revolving" init="1" max="4">
        <or>
          <size>100m</size>
          <time>01:00:00</time>
        </or>
      </rotation>
      -->
    </cocoon>

    <cocoon id="sitemap">
      <filename>${context-root}/WEB-INF/logs/sitemap.log</filename>
      <format type="cocoon">
        %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
      </format>
      <append>false</append>
    </cocoon>

    <cocoon id="handled-errors">
      <filename>${context-root}/WEB-INF/logs/handled-errors.log</filename>
      <format type="cocoon">
        %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
      </format>
      <append>false</append>
    </cocoon>

    <cocoon id="access">
      <filename>${context-root}/WEB-INF/logs/access.log</filename>
      <format type="cocoon">
        %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
      </format>
      <append>false</append>
    </cocoon>

    <!-- The logger for the flow layer -->
    <cocoon id="flow">
      <filename>${context-root}/WEB-INF/logs/flow.log</filename>
      <format type="cocoon">
        %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
      </format>
      <append>false</append>
    </cocoon>

    <!--
      This log file gets only messages with log level ERROR and below.
    -->
    <priority-filter id="error" log-level="ERROR">
      <cocoon>
        <filename>${context-root}/WEB-INF/logs/error.log</filename>
        <format type="cocoon">
          %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
        </format>
        <append>false</append>
      </cocoon>
    </priority-filter>
  </targets>

  <categories>
    <!--
      log-level: One of DEBUG, INFO, WARN, ERROR, FATAL_ERROR.
      Log level could be different for every category and subcategory.

      Not all subcategories are defined in this file. Not defined
      subcategories will be created automatically inheriting settings
      of the parent subcategory.
      When defining subcategory manually, it is required to specify log
      targets, because they are not inherited in this case.
    -->
    <category name="core" log-level="INFO">
      <!-- Startup component manager logger -->
      <category name="startup" log-level="INFO">
        <log-target id-ref="core"/>
        <log-target id-ref="error"/>
      </category>

      <category name="roles" log-level="INFO">
        <log-target id-ref="core"/>
        <log-target id-ref="error"/>
      </category>

      <category name="instrument" log-level="INFO">
        <category name="values" log-level="INFO">
          <log-target id-ref="core"/>
          <log-target id-ref="error"/>
        </category>
        <log-target id-ref="core"/>
        <log-target id-ref="error"/>
      </category>

      <!-- Cocoon component manager logger -->
      <category name="manager" log-level="INFO">
        <log-target id-ref="core"/>
        <log-target id-ref="error"/>
      </category>

      <!-- Cocoon cache and stores logger -->
      <category name="store" log-level="INFO">
        <category name="janitor" log-level="INFO">
          <log-target id-ref="core"/>
          <log-target id-ref="error"/>
        </category>
        <log-target id-ref="core"/>
        <log-target id-ref="error"/>
      </category>

      <log-target id-ref="core"/>
      <log-target id-ref="error"/>
    </category>

    <category name="sitemap" log-level="INFO">
      <log-target id-ref="sitemap"/>
      <log-target id-ref="error"/>

      <category name="handled-errors" log-level="INFO">
        <!-- Exceptions that will be handled by a sitemap errorhandler are
             logged to this target. -->
        <log-target id-ref="handled-errors"/>
      </category>
    </category>

    <category name="access" log-level="INFO">
      <log-target id-ref="access"/>
      <log-target id-ref="error"/>
    </category>

    <category name="flow" log-level="INFO">
      <log-target id-ref="flow"/>
      <log-target id-ref="error"/>
    </category>
  </categories>
</logkit>


Re: No log targets configured for the root logger

by Kazimierz Pogoda :: Rate this Message:

| View Threaded | Show Only this Message

On Sat, 2006-01-14 at 11:11 -0800, Mike Dickson wrote:

>  
>
> Any ideas on what is up given the following error and logkit.xconf?  
>
>  
>
> Error:
>
>  
>
> org.apache.avalon.framework.configuration.ConfigurationException: No
> log targets configured for the root logger.

Try to configure one category with empty logger name. Something like
this:

    <category name="" log-level="DEBUG">
      <log-target id-ref="core"/>
      <log-target id-ref="error"/>
    </category>

I hope it will help.

--
"the spirit can only withdraw into a corner. And yet, it is not at all
 worn out or superfluous, but, like an (eternal) witness, floats above
 the rubble of culture - almost like an  avenger of God.  As though it
 awaited a new incarnation."
                                        -- Ludwig Wittgenstein --
Kazimierz Pogoda
Nordic Consulting & Development Company
mailto:morisil@...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...