glassfish
  1. glassfish
  2. GLASSFISH-20632

Change log file location - some logs are still writing to Glassfish default log file

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2.2
    • Fix Version/s: None
    • Component/s: logging
    • Labels:
      None
    • Environment:

      Windows 2008 R2 64 bit, Oracle JDK 7u17 32bit

      Description

      After we changed the log file location to "D:\logs\server.log" in Glassfish Admin Console. It seems like for the logs under the below categories, will still write to Glassfish default log file in "C:\glassfish3\glassfish\domains\domain1\logs\server.log"

      javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server
      javax.enterprise.system.container.web.com.sun.enterprise.web.vs._asadmin

        Activity

        Hide
        kelvin.loke added a comment -

        Some of the example logs that are written in Glassfish default log file even though log file location has been changed.

        [#|2013-05-22T16:39:39.633+0800|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web.vs._asadmin|_ThreadID=138;_ThreadName=Thread-22;|StandardWrapperValve[FacesServlet]: PWC1406: Servlet.service() for servlet FacesServlet threw exception
        java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response
        at org.apache.catalina.connector.Response.getWriter(Response.java:705)
        at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:225)
        at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)
        at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:431)
        at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:71)
        at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:582)
        at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:115)
        at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:199)
        at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:123)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
        at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:722)

        #]

        [#|2013-06-05T10:42:03.611+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1;_ThreadName=Thread-22;|PWC1412: WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'app'|#]

        [#|2013-06-06T17:52:11.900+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule[null] ServletContext.log():Destroying Spring FrameworkServlet 'app'|#]

        [#|2013-06-06T17:52:11.978+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule[null] ServletContext.log():Closing Spring root WebApplicationContext|#]

        [#|2013-06-06T17:52:42.117+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule[null] ServletContext.log():Initializing Spring root WebApplicationContext|#]

        [#|2013-06-06T17:52:42.336+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'app'|#]

        Show
        kelvin.loke added a comment - Some of the example logs that are written in Glassfish default log file even though log file location has been changed. [#|2013-05-22T16:39:39.633+0800|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web. vs. _asadmin|_ThreadID=138;_ThreadName=Thread-22;|StandardWrapperValve [FacesServlet] : PWC1406: Servlet.service() for servlet FacesServlet threw exception java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:705) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:225) at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723) at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:431) at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:71) at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:582) at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:115) at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:199) at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:123) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722) #] [#|2013-06-05T10:42:03.611+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1;_ThreadName=Thread-22;|PWC1412: WebModule [null] ServletContext.log():Initializing Spring FrameworkServlet 'app'|#] [#|2013-06-06T17:52:11.900+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule [null] ServletContext.log():Destroying Spring FrameworkServlet 'app'|#] [#|2013-06-06T17:52:11.978+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule [null] ServletContext.log():Closing Spring root WebApplicationContext|#] [#|2013-06-06T17:52:42.117+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule [null] ServletContext.log():Initializing Spring root WebApplicationContext|#] [#|2013-06-06T17:52:42.336+0800|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server|_ThreadID=1414;_ThreadName=Thread-22;|PWC1412: WebModule [null] ServletContext.log():Initializing Spring FrameworkServlet 'app'|#]
        Hide
        unwichtich added a comment -

        I have the same problem with Debian 7 and GlassFish 3.1.1.

        I have changed the file location in logging.properties to /var/log/product/server.log but some messages from:

        javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server
        javax.enterprise.system.container.web.com.sun.enterprise.web.vs._asadmin

        are still written (only) to the old server.log in ../glassfish/domains/domain1/logs/server.log.

        I also changed the <log-service> entry file attribute in domain.xml to the new location manually, this didn't help either.

        Show
        unwichtich added a comment - I have the same problem with Debian 7 and GlassFish 3.1.1. I have changed the file location in logging.properties to /var/log/product/server.log but some messages from: javax.enterprise.system.container.web.com.sun.enterprise.web._vs.server javax.enterprise.system.container.web.com.sun.enterprise.web.vs._asadmin are still written (only) to the old server.log in ../glassfish/domains/domain1/logs/server.log. I also changed the <log-service> entry file attribute in domain.xml to the new location manually, this didn't help either.
        Hide
        HeinBloed added a comment - - edited

        I still see exactly the same symptoms on Debian 7 and GlassFish 4.1.

        As a sidenote, I also couldn't find a way to change the location of the "access" subdirectory containing HTTP access logs. Intuitively, I'd expect this logging facility to respect e.g. the "log-root" attribute of the <domain> element in domain.xml, or maybe that there was an element or attribute in the <log-service> element, which unwichtich mentioned.

        Show
        HeinBloed added a comment - - edited I still see exactly the same symptoms on Debian 7 and GlassFish 4.1. As a sidenote, I also couldn't find a way to change the location of the "access" subdirectory containing HTTP access logs. Intuitively, I'd expect this logging facility to respect e.g. the "log-root" attribute of the <domain> element in domain.xml, or maybe that there was an element or attribute in the <log-service> element, which unwichtich mentioned.
        Hide
        HeinBloed added a comment -

        Just to add, the name of the subsystem that still logs to the default location apparently changed with GlassFish 4.1, it is "javax.enterprise.web._vs.server" (and of course all the HTTP access logs).

        Show
        HeinBloed added a comment - Just to add, the name of the subsystem that still logs to the default location apparently changed with GlassFish 4.1, it is "javax.enterprise.web._vs.server" (and of course all the HTTP access logs).

          People

          • Assignee:
            rajendra_inamdar
            Reporter:
            kelvin.loke
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: