| Author |
About rotating log files...
|
Gurumurthy Ramamurthy
Ranch Hand
Joined: Feb 13, 2003
Posts: 271
|
|
I visited the website http://edocs.beasys.co.jp/e-docs/wls/docs90/webapp/weblogic_xml.html regarding rorating log files. It mentioned: rotation-type Values can be: bySize, byName, none But in the same page, under rotation-time column, it mentions that the rotation-type is to be set to byTime. (The start time for a time-based rotation sequence of the log file, in the format k:mm, where k is 1-24. (Requires that you specify a rotation-type of byTime.) At the specified time, the server renames the current log file. Thereafter, the server renames the log file at an interval that you specify in file-time-span. If the specified time has already past, then the server starts its file rotation immediately. By default, the rotation cycle begins immediately. ) I am getting confused, my question is that "Do you have the <rotation-type> to byTime or NOT? This section is ambiguous. Thanks, Guru
|
 |
John Gregory
Ranch Hand
Joined: Oct 05, 2006
Posts: 112
|
|
No, you don't. You can specify a file size, (5MB or whatever) before it rotates. The problem is if you're looking for a specific event, you may have to search multiple log files in order to find your event. There are advantages of each, it just depends on prefrence and what best suits your needs. John
|
 |
Gurumurthy Ramamurthy
Ranch Hand
Joined: Feb 13, 2003
Posts: 271
|
|
But once the number of files reached a number (say 10 files), then I want these files to be removed automatically so that again another set will start. Is there any parameter for setting up this function i.e. after 10 log files, all these 10 files should be cleaned up. Thanks, Guru
|
 |
John Gregory
Ranch Hand
Joined: Oct 05, 2006
Posts: 112
|
|
No, you'd have to write a cron job or some sort of script to do it...at least in my experience. Usually, the log gets rotated to something like: AdminServer.log002346, or access.log002345....etc. John
|
 |
Ramakanta Sahoo
Ranch Hand
Joined: Aug 23, 2008
Posts: 205
|
|
What I know, though WL has ability to split the logfiles into different smaller file as discussed but dont have some inbuilt facility to remove the logs. Use below script to delete log files when the number becomes 10. ./script.sh & It will run each 5days and check the count no need to give a cronjob. If you want to give a conjob then remove the while loop and give it in cron. Note: It will remove all logfiles if it finds logfile count, morethan or equals to 10. Thanks. -Ricky [ November 08, 2008: Message edited by: Ricky Boxon ]
|
Regards, Ricky
Oracle Weblogic 10g Certified Expert
http://www.techpaste.com
|
 |
albert christian
Greenhorn
Joined: Dec 07, 2011
Posts: 1
|
|
Hello,
Can anyone help me i Need the Cron setup for weblogic admin server for the below location:
WebLogic [9.x and 10.x]
1. /WebLogic/apps/<appname>/<DomainName>/servers/<appname>Admin/logs/access.log (Keep last 20 files and delete the rest)
2. /WebLogic/apps/[<appname>/<DomainName(wl9x)server>]/servers/<appname>Admin/logs/<appname>Domain.log (Keep last 20 files and delete the rest)
3. /WebLogic/apps/[<appname>/<DomainName(wl9x)server>]/servers/<appname>Admin/logs/<appname>Admin.log (Keep last 20 files and delete the rest)
4. /WebLogic/apps/<appname>/applications/<appname>/ftpfiles (Check for six months old deployment file and delete the rest)
WebLogic [8.x, 7.x]
1. /WebLogic/apps/<appname>/<appname>Domain/<appname>Admin/acces.log (Keep last 20 files and delete the rest)
2. /WebLogic/apps/<appname>/<appname>Domain/<appname>Admin/<appname>Admin.log (Keep last 20 files and delete the rest)
3. /WebLogic/apps/<appname>/applications/<appname>/ftpfiles (Check for six months old deployment file and delete the rest)
Thanks,
christian
|
 |
 |
|
|
subject: About rotating log files...
|
|
|