Display of custom logs onto Hawtio logConsole

20 views
Skip to first unread message

Sigy Anoop

unread,
May 14, 2020, 2:11:55 AM5/14/20
to hawtio
Hi,
I have deployed the  Hawtio war in JBOSS 6 EAP along with my camel application war.

 - deployed a non-sl4j version of the hawtio war ( with log4j.properties removed)
 - added the logQueryBean  ( from insight-log) in the Camel-Context of the my application war
 - hawtio console displays the camel contexts, routes etc perfectly.

I have a problem with the logs display ..Logs from my custom log are not getting picked up by Hawtio.


My Logger config from  jbsoss _> stanadalone.xml -> logging subsystem

<periodic-rotating-file-handler name="FILE" autoflush="true">
    <formatter>
         <named-formatter name="PATTERN"/>
    </formatter>
     <file relative-to="jboss.server.log.dir" path="server.log"/>
     <suffix value=".yyyy-MM-dd"/>
     <append value="true"/>
 </periodic-rotating-file-handler>
<periodic-rotating-file-handler name="FILE_FM" autoflush="true">
    <level name="INFO"/>
    <formatter>
          <named-formatter name="PATTERN"/>
      </formatter>
      <file relative-to="jboss.server.log.dir" path="serverFM.log"/>
       <suffix value=".yyyy-MM-dd"/>
        <append value="true"/>
 </periodic-rotating-file-handler>

....

<logger category="com.my.pkg.xx.fmr" use-parent-handlers="false">
     <handlers>
      <handler name="FILE_FM"/>
                   
      </handlers>
</logger>

The logs routed to the custom Logger (serverFM.log) are not getting picked up by Hawtio. All the logs from  server.log gets into Hawtio log console.

If i remove the use-parent-handlers="false" from the FILE_FM logger category definition, it routes the logs to both server.log and serverFM.log and gets picked up by Hawtio as well. I want to avoid this logs duplication.. Is there any way to get the custom logs picked-up by the Hawtio than removing the  use-parent-handlers="false" 

Thanks,
Sigy

Tadayoshi Sato

unread,
May 15, 2020, 12:25:44 AM5/15/20
to Sigy Anoop, hawtio
Hi,

Which version of Hawtio are you using?  For Hawtio 2.x, JBoss EAP 6 is an old container and we don't test against it. If you can use EAP 7 or latest WildFly then hawtio-wildfly.war is available.

You might also be interested in WildFly-Camel, which includes Hawtio console and the installation steps automatically installs Hawtio for you too.

--
You received this message because you are subscribed to the Google Groups "hawtio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hawtio+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hawtio/0af3e50a-d1db-4121-842f-94068a663664%40googlegroups.com.


--
Tadayoshi Sato
Message has been deleted

Sigy Anoop

unread,
May 15, 2020, 2:49:06 AM5/15/20
to hawtio
Hi Tadayoshi,
Thanks for your reply .. I am using hawtio-no-slf4j-1.5.11.war  We are migrating to EAP7 . Sure I will try on EAP7, Can i use hawtio-wildfly.war on EAP7? or is it only for wildfly?
Thanks,
Sigy

Tadayoshi Sato

unread,
May 15, 2020, 2:52:53 AM5/15/20
to Sigy Anoop, hawtio
Hi Sigy,

Yes, Hawtio 2.x hawtio-wildfly.war should work with EAP 7 too. I recommend also considering using WildFly-Camel. It's easier to correctly install Hawtio on WildFly. WildFly-Camel 5.x should be the relevant versions for EAP 7.

On Fri, May 15, 2020 at 3:31 PM Sigy Anoop <sigy...@gmail.com> wrote:
Hi Tadayoshi,
I am using hawtio-no-slf4j-1.5.11.war .. Yes i will try on EAP 7 as we are planning to migrate to EAP7.  Is hawtio-wildfly.war  usable along with EAP7 or is it only applicable to wildfly?
Thanks,
Sigy
To unsubscribe from this group and stop receiving emails from it, send an email to haw...@googlegroups.com.


--
Tadayoshi Sato

--
You received this message because you are subscribed to the Google Groups "hawtio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hawtio+un...@googlegroups.com.

Sigy Anoop

unread,
May 22, 2020, 4:56:29 AM5/22/20
to hawtio
Hi Tadayoshi,
I applied the WildFly-Camel patch 5.x   (wildfly-camel-patch-5.1.0.tar.gz) to EAP 7 and deployed my application war.
the WildFly-Camel patch 5.x came with a hawtio in it -->hawtio-wildfly-1.5.7.war

The logs from the custom logs ( like serverFM.log) which has redirected -logs from app package --> com.my.pkg.xx.fm does not get captured in Hawtio.
If i remove the below flag, use-parent-handlers="false"  then the logs do come , but the disadvantage is that they also come in the server.log . wanted to avoid this. 
<logger category="com.my.pkg.xx.fmuse-parent-handlers="false">
     <handlers>
      <handler name="FILE_FM"/>
                   
      </handlers>
</logger>

Anything i have to do in the JBOSS config to get rid of this?
Thanks,
Sigy

Tadayoshi Sato

unread,
May 25, 2020, 4:05:10 AM5/25/20
to Sigy Anoop, hawtio
Hi Sigy,

I'm not an expert on WildFly logging, but considering at least the logs show up when using the parent handler, all you need is configure the app log handler appropriately as you will.

--
You received this message because you are subscribed to the Google Groups "hawtio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hawtio+un...@googlegroups.com.


--
Tadayoshi Sato
Reply all
Reply to author
Forward
0 new messages