Forums Register Login
About rotating log files...
I visited the website http://edocs.beasys.co.jp/e-docs/wls/docs90/webapp/weblogic_xml.html regarding rorating log files.

It mentioned:

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.

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.

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.

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.

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.

[ November 08, 2008: Message edited by: Ricky Boxon ]

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)


Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 4465 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 20, 2018 06:47:23.