Re: How to remove a single line from a flat file (Still very off-topic.)



On May 19, 2:19 pm, Darren New <d...@xxxxxxxxxx> wrote:
Eric wrote:
But the fact that if you want to (say) edit the syslog file you have to
turn off syslog (so it's not writing to the file while you edit it),
that tells me you're missing something in the kernel.

If you need to edit it, it's not a log file.

Editting includes rotating the log file, removing old entries, etc.

Of course, part of the problem is the design of these files. Why are
they writing to one log file, then rotating that file to a new name
while creating a new one? Why not just open a log file a day? Or one a
week/month/year (what ever time span is used for splitting? If the
application designer simply took a parameter indicating the frequency
of creating a new log file (NN minutes/hours/days/months/years), then
nothing extra would be necessary - the application would just close
the old, open the new, and move on.

The point I'm trying to make is that many of the problems that people
attempt to work around stem from the "simplicity" design strategy. So
instead of someone writing a library for managing log files, they use
a simple "open file/write to file" strategy and allow the policy
management to fall to the administrator. And I'd suspect that in this
case, more time/energy/money is spent on the admin juggling log files
than would be spent on writing and debugging a library which used some
sort of config parameters to do the juggling, then integrating calls
to the library into each application generating logs that need
juggled.




.



Relevant Pages

  • Re: Multi-Threading
    ... 100,000+ line log file and decided to use multi-threading as a solution to ... Multi-threading on the desktop is useful when you're executing long running ... getting the info is a problem or is writing it the database, ... Do Until intcount> intcount1 ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Hard Drive Space
    ... of the distribution, ... security problems it had over the life of the distribution. ... in the space, either the box is 0wn3d, or you have a process that is writing ... If you don't recall removing some log file manually, ...
    (linux.redhat)
  • Re: Logrotate is a pain
    ... >>important feature is that the program, which writes the logfiles does ... > to have missed is that if you rename an open log file, ... > writing to it continues writing to it regardless of the name. ... You can simply put a simple line in it to send SIGHUP to your daemon and the ...
    (comp.os.linux.misc)
  • Re: Logrotate is a pain
    ... to have missed is that if you rename an open log file, ... writing to it continues writing to it regardless of the name. ... is that the process is writing to an open inode; ...
    (comp.os.linux.misc)
  • Re: Visual & Verbal are not as disparate as language suggests
    ... design, and layout she wanted for her book. ... but not directly for writing. ... for this communication, however is ... of your brain and adding a new perspective such as visualization can ...
    (rec.arts.sf.composition)