----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Michael Weissenbacher wrote:
> 
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
> 
> i checked again and you all were right there is a log() method in JSDK2.0!
> 
> but i'm afraid i cannot say what's the problem with your installation. maybe
> you should recompile webmacro against JSDK2.1 and the java version you are
> using.
> 
> michael


Hi, everybody!!!

Check out your jserv.properties file.
You have to set the "log.chanel.servletLog"-variable to "true":

# Servlet log
# All messages logged by servlets. Probably you want
# this one to be switched on.
log.channel.servletLog=true

Someone asked for an example (?). Well, I'm using this
method for closing the connection to an Oracle-database
(myConnection.close())
and destroying the servlet.
It uses the log-method to indicate if the connection
was closed (taken from: "Java Server und Servlets; Addison-Wesley; Peter
Rossbach").

The output in the jserv.log file looks like this:
[07/02/2001 19:18:55:153 CET] CustomerNet: *** Die Datenbankverbindung
'oracle.jdbc.driver.OracleConnection@59a1fd11' wurde geschlossen ***
  
    /** 
    * Destroys the servlet.
    */  
    public void destroy() {
        try {
            if (myConnection != null) {
                myConnection.close();
                log("*** Die Datenbankverbindung '" +
myConnection.toString() +
                    "' wurde geschlossen ***");
            }
        }
        catch (Exception e) {
            log("*** Fehler beim Schließen der Datenbankverbindung: " +
                e.toString() + " ***");
        }
        finally {
            myConnection = null;
        }
    }

It works fine with JSDK2.0!!!!!

OLAF DAVID





> -----Original Message-----
> From: Michal Galinski [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 5:01 PM
> To: Apache JServ mailing list
> Subject: log() method problem
> 
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
> 
> I'am using now JSDK2.1 but some months ago I have used 2.0 (but with
> IPlanet).
> I am sure, that log() method is either in javax.servlet.GenericServlet class
> and javax.servlet.ServletContext interface.
> 
> And I am sure that log() in javax.servlet.GenericServlet was in JSDK2.0 too.
> 
> So still is the question.
> 
> Michal Galinski
> 
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search Archives:
> <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
> 
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search Archives:
> <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to