L
Lew
Novice said:Arved said:Novice wrote:
[ SNIP ]It would be very helpful if someone could explain what would happen
in a real-world production situation where a long-running batch
program or a constantly-running online program started writing error
messages to the log. What will operators do to be able to read the
log? I'm guessing they force it to close early and then start a new
file or they have a tool that will read the log file correctly even
without the final </log> tag.
As mentioned, "tail" or "tail -f".
Or vi or emacs.
Or "less".
Or just about anything.
I'm a little surprised by that. I would have thought actual errors would
get acted on fairly quickly, particulary anything categorized as SEVERE.
"Acted on quickly" means that it happened.
And he said "routine errors", not "SEVERE".
Have you looked at any real system's logs?
You should.
(I'll use the java.util.logging levels for these remarks.) I could see
that something that is categorized as WARNING may take longer to fix,
especially if WARNING is used for messages that indicate the program is
able to continue using some kind of alternate strategy; if the alternate
Not necessarily.
strategy is perfectly reasonable and doesn't skew the result, there's no
great harm in leaving the problem unsolved. But if we assume that a
Way wrong. There's always harm in leaving a WARNING unresolved. Otherwise it'd be reported at a lower level.
SEVERE error is a show-stopper, wouldn't that get dealt with right away?
It has to happen first, then it can be dealt with. Otherwise there's nothing with which to deal.
I haven't worked on Unix/Linux in a while but I have used 'tail' ;-)
Frankly, I don't recall if it works on open files but from you've said,
apparently it does.
"man tail"
GIYF.
If it didn't work on open files, "tail -f" would be pretty useless, now wouldn't it?
That "console output" one should already be way familiar to you.
Perfect. Existing tools that will read the file while still being written
are what I was hoping for ;-)
Basic OS knowledge here. Nothing outré about reading a file while it's being written.
Programmers need to know more than the basics of OSes, let alone have gaps in the basics.