Re: lew? 2 qq



I do not know this word "qq".

beelzibub @ bawston school for idiots wrote:
1 why not just catch the error then write it to std.err [sic] so if your
program does dump there is written for you to debug by?

This is a good question. Logging utilities are much more flexible. stderr is just one channel, and not an especially good one for things like Web servers. Everyone writes to the same channel, and the logging overhead to stderr is incurred with every call; that can have an adverse impact on performance. Furthermore, it is inflexible: you have to invent your own formats, disentangle all the output from multiple sources, disentangle important output from less so, and you can't selectively suppress some log output and not other.

With a library such as log4j, you have very good control. You can suppress logging output "below" a certain level of granularity for most stuff most of the time; that means you might log only "SEVERE" or "ERROR" level messages in production. All less critical messages ("WARNING", "DEBUG", etc.) not only are not emitted, they have negligible impact on production performance. Only messages that are emitted cause overhead.

Furthermore, you can have different parts of the system log at different levels. For example, if one web service class is troublesome, you crank up its logging level to DEBUG but leave everyone else ERROR only.

Not only that, you can log each program, each class, even each method to separate outputs should you choose. You can even simultaneously log to multiple outputs, such as the stdout stream and a named log file. You can even log to a database. But wait, there's more. Logging is configurable at deployment time via an external resource file, so you don't even have to hard-code all that control. This includes formatting and built-in handling of multiple threads.

Logging is as superior to System.err output (or, shudder, System.out) as a Ferrari is to a VW.

2 my program runs fine but the spinners(i have 3), when you clik to advance one it goes way up, almost infinite.

Congratulations.

BTW, how close to infinite do you have to get to be "almost" there?

--
Lew
.



Relevant Pages

  • Re: permissions on /etc/namedb
    ... after initially resisting the idea of using rndc trace being 'advanced'. ... Query logging has its own log category, so you would do something like ... Same with debug logging; I'm ... The problem is that the default_debug channel has a special ...
    (freebsd-net)
  • Re: C# exe calling an exe (process.start) - not working on one ser
    ... Check the exit code from the process (if you set exit codes in ... The problem what Std out redirection related. ... > logging... ... >>> Since it is a production server, I cannot debug the code there and I ...
    (microsoft.public.dotnet.general)
  • RE: Error in Release Mode
    ... The text logging was a good idea. ... some initializations were causing the problems... ... >> In the debug case, m_btestcase may always be false in which case your code ... >> it very useful to create a logging class that writes a textfile. ...
    (microsoft.public.win32.programmer.directx.video)
  • [PATCH] firedtv: reinstate debug logging option
    ... Henrik Kurelid tells me that FCP debug logging (which I removed during ... instead of -1 enables only hexdumps of the entire FCP frames. ...
    (Linux-Kernel)
  • Re: Debugger Already attached, help
    ... you can quickly see that you can concurrently debug multiple IIS ... if the debugger modules are installed under the framework folder ... How is it MS thinks that only one developer ...
    (microsoft.public.dotnet.framework)

Loading