|
Prev: Lesson 8, Structures, Unions, Fields, Pointers to Structures,Enums (Don't worry, Be happy: VS IDE 2008: WORSE CRAP than D2007 IDE :))
Next: Lesson 8, Structures, Unions, Fields, Pointers to Structures, Enums (Don't worry, Be happy: VS IDE 2008: WORSE CRAP than D2007 IDE :))
From: Gerhard Wolf on 16 Apr 2008 07:58 Hi, in my C++ application i use LOG-Files. At the moment i have no idea how to chop them efficiently if they exceed a size (or linecount) limit. Surely has been many times implemented and is used on linux (/var/logs/messages). How can i do that efficiently?
From: Stefan Naewe on 16 Apr 2008 08:18 On 4/16/2008 1:58 PM, Gerhard Wolf wrote: > Hi, > > in my C++ application i use LOG-Files. At the moment i have no idea how > to chop them efficiently if they exceed a size (or linecount) limit. > Surely has been many times implemented and is used on linux > (/var/logs/messages). > > How can i do that efficiently? Don't reinvent the wheel. Use something like 'logrotate'. S. -- Stefan Naewe stefan dot naewe at atlas-elektronik dot com Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html
From: Aggro on 16 Apr 2008 13:14
Gerhard Wolf wrote: > Hi, > > in my C++ application i use LOG-Files. At the moment i have no idea how > to chop them efficiently if they exceed a size (or linecount) limit. > Surely has been many times implemented and is used on linux > (/var/logs/messages). > > How can i do that efficiently? Rename the old file and create a new empty file with the old name. |