Weblogic的Log需啟動複寫的機制,避免檔案不斷增長造成佔用空間越來越多。

(1)登錄到WebLogic管理介面 (http://localhost:7001/console/)
(2)於左方功能區塊:網域結構(Domain Structure)下,點選【伺服器(Server)】
(3)選擇要設定的主機(Instance)
(4)第一排頁籤選擇【紀錄日誌(Logging)】
(5)【Http、一般】兩頁籤皆需設定
(6)勾選【限制保留的檔案數】,設定【要保留的檔案數】
(7)設定完成後,左上解點選【啟動變更】

備註:設定後,發現還是沒生效,可能要重啟Weblogic...


檔案路徑:
D:\oracle\Middleware\user_projects\domains\XXXXX\config

檔案內容: number-of-files-limited > true 代表啟動
<server>
    <name>APName</name>
    <ssl>
      <enabled>false</enabled>
    </ssl>
    <log>
      <file-name>logs/APName.log</file-name>
      <rotation-type>bySize</rotation-type>

      <number-of-files-limited>true</number-of-files-limited>

      <file-count>2</file-count>
      <file-min-size>5000</file-min-size>
      <rotate-log-on-startup>false</rotate-log-on-startup>
    </log>
    <machine>machineName</machine>
    <listen-port>8082</listen-port>
    <listen-port-enabled>true</listen-port-enabled>
    <cluster xsi:nil="true"></cluster>
    <web-server>
      <web-server-log>
        <file-name>logs/access.log</file-name>
        <rotation-type>bySize</rotation-type>

        <number-of-files-limited>true</number-of-files-limited>

        <file-count>2</file-count>
        <file-min-size>5000</file-min-size>
        <rotate-log-on-startup>false</rotate-log-on-startup>
        <logging-enabled>true</logging-enabled>
      </web-server-log>
    </web-server>
    <listen-address></listen-address>
    <java-compiler>javac</java-compiler>
    <server-start>
      <arguments>-XX:MaxPermSize=256m -

Djavax.xml.rpc.ServiceFactory=oracle.j2ee.ws.client.ServiceFactoryImpl -Xms32m -

Xmx1024m</arguments>
    </server-start>
    <client-cert-proxy-enabled>false</client-cert-proxy-enabled>
    <server-diagnostic-config>
      <wldf-diagnostic-volume>Low</wldf-diagnostic-volume>
    </server-diagnostic-config>
  </server>
  <server>

 

參考文章:

如​何​对​A​I​X​、​O​R​A​C​L​E​、​W​e​b​L​o​g​i​c​和​W​e​b​S​p​h​e​r​e​进​行​调​优
http://wenku.baidu.com/view/62b3a551ad02de80d4d840ff.html

Weblogic Server setup
http://ader1972.pixnet.net/blog/category/935763


原廠手冊:

12c Cloud Control: How to Enable Log Rotation Policy to Automatically Delete Older GCDomain.log,

EMGC_ADMINSERVER.log and access.log Files? (Doc ID 1450535.1)
https://support.oracle.com/epmos/faces/DocumentDisplay?

_afrLoop=406337595893727&id=1450535.1&displayIndex=2&_afrWindowMode=0&_adf.ctrl-

state=1ycjy4acb_81
> 較詳細,有包含圖片及步驟說明。


E-WL: How to Setup Log Rotation for WebLogic 9.2 (Doc ID 805493.1)
https://support.oracle.com/epmos/faces/DocumentDisplay?

_afrLoop=503069658615943&id=805493.1&displayIndex=15&_afrWindowMode=0&_adf.ctrl-

state=gm6ty45km_526

E-WL: WebLogic 10.3 Logging Rotation Fails to Limit the Number of Retained Log Files (Doc ID

1518349.1)
https://support.oracle.com/epmos/faces/DocumentDisplay?

_afrLoop=501330546353231&id=1518349.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-

state=gm6ty45km_81

 


引用文章:
http://help.adobe.com/en_US/enterpriseplatform/10.0/AdminHelp/WS92d06802c76abadb-

5145d5d12905ce07e7-7c8f.html

Start WebLogic Server
1.From a command prompt, go to [appserver root]/user_projects/domains/[appserverdomain].

2.Enter the following command:

■(Windows) startWebLogic.cmd

■(Linux, UNIX) ./startWebLogic.sh

Stop WebLogic Server
1.Start WebLogic Server Administration Console by typing http://[host name]:7001/console in the

URL line of a web browser.

2.Log in by typing the user name and password that was used when creating this WebLogic

configuration, and then click Log In.

3.Under Change Center, click Lock & Edit.

4.Under Domain Structure, click Environment > Servers.

5.Click AdminServer and, on the Settings for AdminServer pane, click the Control tab.

6.Ensure that AdminServer is selected in the Server Status table and click Shutdown.

7.Select When Work Completes to gracefully shut down the server or select Force Shutdown Now to

stop the server immediately without completing ongoing tasks.

8.On the Server Life Cycle Assistant pane, click Yes to complete the shutdown.

The WebLogic Server Administration Console is no longer available, and the command prompt that

you ran the start command from is available.

 

arrow
arrow
    全站熱搜

    Nathan 發表在 痞客邦 留言(0) 人氣()