File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Log file rotation issue  in weblogic10 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Log file rotation issue  in weblogic10" Watch "Log file rotation issue  in weblogic10" New topic
Author

Log file rotation issue in weblogic10

basanta dwibedy
Greenhorn

Joined: Feb 05, 2007
Posts: 23
Hi,
Currently i am using Weblogic 10.0.1.0 version.
In my project we have 4 server instance which generate logs separately and also we have one domain level logging . we are not using log4j logging . we are using weblogc defult logging mechanism for logging. And my server is running in production mode.

My problem is in domain level my log file is not rotating . I have tried all the general option like modification of log attribute in both config.xml file and also using admin console level. And after that also restarted server but still facing same issue.
Note: i have tried both rotation policy "By Size" and "BY TIME".

IS there any thought? what would be the solution.
IS it weblogic version issue?
Or its a know issue and we can resolved this using WLST ?

Please reply me soon. with your thought...
robin patel
Greenhorn

Joined: Jan 03, 2011
Posts: 16
Hi,

I do not think that this is a Bug

can you try the below suggestion and let me know?

#invoke WLST
C:\>java weblogic.WLST
#connect WLST to an Administration Server
wls:/offline> connect('username','password')
#navigate to the ServerRuntime MBean hierarchy
wls:/mydomain/serverConfig> serverRuntime()
wls:/mydomain/serverRuntime>ls()
#navigate to the server LogRuntimeMBean
wls:/mydomain/serverRuntime> cd('LogRuntime/myserver')
wls:/mydomain/serverRuntime/LogRuntime/myserver> ls()
-r-- Name myserver
-r-- Type LogRuntime
-r-x forceLogRotation java.lang.Void :
#force the immediate rotation of the server log file
wls:/mydomain/serverRuntime/LogRuntime/myserver> cmo.forceLogRotation()
wls:/mydomain/serverRuntime/LogRuntime/myserver>
The server immediately rotates the file and prints the following message:
<Mar 2, 2005 3:23:01 PM EST> <Info> <Log Management> <BEA-170017> <The log file C:\diablodomain\servers\myserver\logs\myserver.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<Mar 2, 2005 3:23:01 PM EST> <Info> <Log Management> <BEA-170018> <The log file has been rotated to C:\diablodomain\servers\myserver\logs\myserver.log00001. Log messages will continue to be logged in C:\diablodomain\servers\myserver\logs\myserver.log.>


Also, this link will help you a lot

http://download.oracle.com/docs/cd/E13222_01/wls/docs91/logging/config_logs.html#1001654


Regards,
Rob

Tracy Shar
Greenhorn

Joined: Nov 14, 2011
Posts: 1
I am facing a similar issue with my weblogic server. But in my case, the log rotates the first time and creates a xxx.log001 and then xxx.log002. But after this i can see that .log001 keeps getting bigger and bigger, and new files are not created. I have used the by size attribute and specified MIN number of files as 7.

basanta, where you able to resolve your issue or find any workaround for it?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Log file rotation issue in weblogic10
 
Similar Threads
log rotation problem
Using jdk1.4 logging api with weblogic
Weblogic 9.2 + log4j : Adding path to log file not working
weblogic log creation for webapps
Tomcat, @WebFault logging