You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "karan singh malhi (JIRA)" <ji...@apache.org> on 2007/08/22 22:42:32 UTC

[jira] Commented: (OPENEJB-669) remove hsql log messages from server startup

    [ https://issues.apache.org/jira/browse/OPENEJB-669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521925 ] 

karan singh malhi commented on OPENEJB-669:
-------------------------------------------

I have been able to clean it up. Basically the way Hsql Server is
coded is a little different. Some setters and getters on invocation
print to the console before the fields are actually assigned a value.
For example, hsql Server has a boolean property called silent, here is
how it is set

public boolean setSilent(boolean silent){
   // print to console that this method was called
   // do some stuff
   this.silent = silent;
}
So you can see that even if i ask hsql to remain silent, it will still
not really remain silent. It will atleast print that the method
setSilent was called.

Okay, so here is another property of type PrintWriter called
logWriter. If I set it to null, then we do not see *all* of the
messages on the console but we do see one , which is something like

[Server@5e9d7a]: [Thread[HSQLDB Server @5e9d7a,5,main]]: run()/openDatabases():

This is because one of the methods calls another method called
printError which prints to the console. It uses a
PrintWriter errWriter ;

Here is a dirty solution which can be improved upon, but we need to
have some discussion on setting up configurable properties for hsql.
We will pretty much lose hsql logs using this solution. I think we
should still be able to see traces of JDBC messages.

I have hard-coded the setLogWriter and setErrWriter to null and set
the slient property to true. This way we will not see any messages.
However, we should really be setting these properties from
server.properties file which hsql requires.



-- 
Karan Singh Malhi


> remove hsql log messages from server startup
> --------------------------------------------
>
>                 Key: OPENEJB-669
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-669
>             Project: OpenEJB
>          Issue Type: Improvement
>          Components: server
>            Reporter: karan singh malhi
>         Attachments: openejb-669.patch
>
>
> When openejb server starts, HSQL dirties the console output with its own log messages. Remove those messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.