5 Replies Latest reply on Jul 28, 2013 8:59 PM by Stephen Coy

    No logs on jboss EAP 6 using slf4j (logback library) over axis2

    Carlos Go Newbie

      Hi,

       

            I am developing webservices over Axis2 and Jboss EAP but I have no logs with slf4j and logback. When I use log4java without slf4j it appears, but I cant keep out slf4j of my project.

       

            I am using a SUSE SO.


            Any suggestion? Any help?

       

            So much thank in advance.

       

            BR.

        • 1. Re: No logs on jboss EAP 6 using slf4j (logback library) over axis2
          Claudio Miranda Apprentice

          I did not understood. Do you want log statements printed in standard server.log ?

           

          or

           

          do you want to use slf4j and logback, but logs are not written in desired file ?

          • 2. Re: No logs on jboss EAP 6 using slf4j (logback library) over axis2
            Stephen Coy Master

            What is the structure of your project?

             

            And off-topic, but why do you think you need Axis2? JBossAS/WildFly includes a full JAX-WS stack.

            • 3. Re: No logs on jboss EAP 6 using slf4j (logback library) over axis2
              Carlos Go Newbie

              Hi,

               

               

                        I can see the own jboss logs on server.log file. The problem is that I am trying to see my webservice project logs which I am redirecting them to other path using logback over slf4j.

               

                        My logback file is the next:

               

                                  <?xml version="1.0" encoding="UTF-8"?>

                                  <configuration>

                                            <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">

                                                      <file>/storage/no-backup/webservice.log</file>

                                                      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

                                                      <!-- daily rollover -->

                                                      <fileNamePattern>webservice.%d{yyyy-MM-dd}.log</fileNamePattern>

                                                      <!-- keep 30 days' worth of history -->

                                                      <maxHistory>30</maxHistory>

                                                      </rollingPolicy>

                                                      <encoder>

                                                                <pattern>%d %-4relative [%thread] %-5level - %msg%n%caller{2, DISP_CALLER_EVAL}</pattern>

                                                      </encoder>

                                            </appender>

                                            <root level="ALL">

                                                      <appender-ref ref="FILE"/>

                                            </root>

                                  </configuration>

               

               

                        My server design is like this:

               

                                  Webservices

                                  -----------

                                    slf4j

                                  -----------

                                    Axis2

                                  -----------

                                    Jboss

                                  -----------

                                    SUSE

                                  -----------

               

                        I am using slf4j because I have other java process (core process on my app) which are under slf4j too and I should keep the same 3er parties I am using.

               

                        Is there any problem with Axis2 on jboss? JAS-WS is a nice alternative with same performance solution?

               

               

                        Thanks again.

              • 4. Re: No logs on jboss EAP 6 using slf4j (logback library) over axis2
                Claudio Miranda Apprentice

                See if this helps

                 

                https://docs.jboss.org/author/display/AS71/How+To

                 

                See "How do I use log4j.properties or log4j.xml instead of using the logging subsystem configuration?"

                • 5. Re: No logs on jboss EAP 6 using slf4j (logback library) over axis2
                  Stephen Coy Master

                  Carlos Go wrote:

                   

                            ...

                   

                            Is there any problem with Axis2 on jboss? JAS-WS is a nice alternative with same performance solution?

                   

                            ...

                  Every Java EE application server is required to supply a webservice stack. Therefore adding your own is at best redundant and at worst can result in strange classloading issues (due to collisions with the server implemention) that need to be debugged.

                   

                  With regard to performance, web services tend to be dominated by I/O performance so the actual implementation will not normally have a significant impact. The chances are that you're already using JAX-WS on top of Axis 2 anyway.