🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages Started by Michael Walker Fri, 25 Jul 2003 19:41
Using the new Logging API in java.util.logging
#516
Author: Michael Walker
Date: Fri, 25 Jul 2003 19:41
8 lines
1401 bytes
I am trying to understand the Logging API that was implemented in JDK 1.4.x.
Does anyone know how to retrieve individual LogRecords from a specified
Logger instance? Can anyone point me to some example(s) that uses the
Logging API?  Thanks.

Michael A. Walker
System Arts, Inc
mwalker@systemarts.com
Re: Using the new Logging API in java.util.logging
#518
Author: John McGrath [TeamB]
Date: Tue, 29 Jul 2003 04:21
34 lines
2490 bytes
On 7/25/2003 at 3:41:23 PM, Michael Walker wrote:

> I am trying to understand the Logging API that was implemented in JDK
> 1.4.x.  Does anyone know how to retrieve individual LogRecords from a
> specified Logger instance? Can anyone point me to some example(s)
> that uses the Logging API?

The Logging API is mostly a mechanism for controlling the flow of log
messages, filtering and formatting them, not for persisting them.  You
can use it to channel the log messages in the appropriate format to the
appropriate "handler", which displays or persists the log messages.

Typically, you would use the Java Logging API to channel messages to
something like the system event log or to a syslog port, and the log
messages would be stored by those systems.  You could just as easily
store the logged messages into a database table.

The Java Logging facility does include handlers for storing the log
messages to a file, a set of rotating files, or to a socket.  There are
probably other handlers available somewhere, but I think that is all
that is included out of the box.

You might want to look at the Log4j package, which is part of the
Apache Jakarta project.  This performs pretty much the same function as
the Java Logging API, but it is more mature and functional than the
Java Logging API and it works with versions of Java prior to 1.4.  It
also comes with a much better selection of handlers, such as one that
saves log messages to the Windows Event log.  You can read about Log4j
at http://jakarta.apache.org/log4j.

-- 
Regards,

John McGrath  [TeamB]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads