Limit on log files

Hi,

Is it possible to put a limit to the size of a log file? I have an application that generates log files, and they get really big after a while to the point where it becomes an issue. I don't want to disable logging as it is a bad idea from a security point of view.

Any suggestions?

Thanks,

Lily.
ok_lilyaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
Setup a script to move them to a different location and either back them up and remove them or delete them after a period of time.
0
ok_lilyaAuthor Commented:
Do you have an example of a script or any sites? What kind of a script would that be?

Thanks,

Lily.
0
ok_lilyaAuthor Commented:
Also, how would I know when to archive a file - according its size or just schedule an archive at a particular time?
0
Top Threats of Q1 & How to Defend Against Them

WEBINAR: Join WatchGuard CTO and our Threat Research Team on Aug. 2nd to hear the findings from our Q1 Internet Security Report! Learn more about the top threats detected in the first quarter and how you can defend your business against them!

Lee W, MVPTechnology and Business Process AdvisorCommented:
Using the Schedule Tasks control panel to schedule a batch script (other scripts are possible, but that's what I'd use) to run every night - or week - and copy the files elsewhere.  For example, if your log files were created in c:\program files\myapp\logs, then I'd do this:

@echo off
move "c:\program files\myapp\logs\*.log" "d:\log-backup-folder"


You could do more - kick off a backup, zip the files, delete them, whatever.  But this would do.
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
It also depends on the application - IIS websites create log files and optionally limit their size.  What applications is generating the log?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ok_lilyaAuthor Commented:
Oh great - I can see it now.
Yes it is an IIS website. I can see now how to limit log file size.

Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.