A Question about Apache LogKit 1.0

G

George Yang

Hello, Everyone,

I have got a problem with Apache's Logkit (ref.
http://www.apache.org/dist/avalon/logkit/binaries/).

I can use the kit with standalone application without any problems.
However, when I migrate the application to a server side, I couldn't delete
the produced log after the application finished.
On window PC, the system gives a Error that says "... There has been a
sharing violation. The source or destination file may be in use.".
After I have debugged on both Standalone mode and server side mode, I found
the behave of method Logger.getLogTargets() are different.
On standalone mode, it returns the LogTargets correctly so that I can close
the FileTarget before the application exits. On server side mode, it return
nothing so I can do nothing for the FileTarget, which remains open after
the application finished.
In the API, the method Logger.getLogTargets() is remarked as "Deprecated.
This method is deprecated and will be removed in Future version. Previously
it allowed unsafe access to logtargets which permitted masqurade attacks. It
currently returns a zero sized array.".
if so, how should I properly flush/close my log file? Has anyone got a idea?

Thanks in anticipation,

George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top