• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About rotating log files...

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 256
Netbeans IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
reply
    Bookmark Topic Watch Topic
  • New Topic