1 Reply Latest reply: Jul 9, 2008 7:49 PM by 3004 RSS

    Using API mbean for HTTP Logging - WebServerLogMBean

    666705
      I have been trying to configure http logging using API MBEANS. For some reason, the values are not being passed along.

      I am using WLST to call a .py to configure the values. For the general logging, it works without issue.

      Also, along the same format, how can logging be adjusted for the admin logs.

      Version WL: 10
      ****SCRIPT*****
      import weblogic.management.configuration.LogMBean as LogMBean
      import weblogic.management.configuration.WebServerLogMBean as WebServerLogMBean

      # This section creates the Log MBean and configures it for log rotation.
      create(managedServerName, 'Log')
      cd('Log/' + managedServerName)
      cmo.setRotationType(LogMBean.TIME)
      cmo.setFileName('logs/' + managedServerName + '.log')
      cmo.setFileCount(25)

      # This section creates the WebServer Log MBean and configures it for log rotation. HTTP LOGGING
      cmo.setRotationType(WebServerLogMBean.TIME)
      cmo.setFileCount(15)
      cmo.setLogFileFormat(extend)
      cmo.setELFFields("c-ip date time cs-method cs-uri sc-status bytes time-taken")

      *****END OF SCRIPT*****

      Any help is appreciated.

      --
      Edited by woodalla at 06/09/2008 11:25 AM
        • 1. Re: Using API mbean for HTTP Logging - WebServerLogMBean
          3004
          Can you provide more info on what the problem is? What do you mean by
          the values are not being passed along?

          Andrew Woodall wrote:
          I have been trying to configure http logging using API MBEANS. For some reason, the values are not being passed along.

          I am using WLST to call a .py to configure the values. For the general logging, it works without issue.

          Also, along the same format, how can logging be adjusted for the admin logs..

          Version WL: 10
          ****SCRIPT*****
          import weblogic.management.configuration.LogMBean as LogMBean
          import weblogic.management.configuration.WebServerLogMBean as WebServerLogMBean

          # This section creates the Log MBean and configures it for log rotation.
          create(managedServerName, 'Log')
          cd('Log/' + managedServerName)
          cmo.setRotationType(LogMBean.TIME)
          cmo.setFileName('logs/' + managedServerName + '.log')
          cmo.setFileCount(25)

          # This section creates the WebServer Log MBean and configures it for log rotation. HTTP LOGGING
          cmo.setRotationType(WebServerLogMBean.TIME)
          cmo.setFileCount(15)
          cmo.setLogFileFormat(extend)
          cmo.setELFFields("c-ip date time cs-method cs-uri sc-status bytes time-taken")

          *****END OF SCRIPT*****

          Any help is appreciated.

          --
          Edited by woodalla at 06/09/2008 11:25 AM