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:32:31 UTC

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

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


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.


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

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins reassigned OPENEJB-669:
-------------------------------------

    Assignee: 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
>            Assignee: karan singh malhi
>         Attachments: Openejb-669-latest.patch, 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.


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

Posted by "karan singh malhi (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "karan singh malhi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

karan singh malhi updated OPENEJB-669:
--------------------------------------

    Attachment: Openejb-669-latest.patch

Ignore Openejb-669.patch and apply this patch instead. 
Here is a basic overview of what changes are part of this patch :
1. Added org.apache.openejb.server.Hsql.HsqlPrintWriter, which basically writes to the openejb.log file. This is on the same lines as the Log4jPrintWriter in the org.apache.openejb.util package.
2. Added a new LogCategory named Openejb.hsql
3. Updated logging.properties and embedded.logging.properties with the new LogCategory defined in 2 above
4. Updated org.apache.openejb.server.Hsql.HsqlService to do the following:
    a. set the silent property of the server to true
    b. set the HsqlServer logWriter to an instance of HsqlPrintWriter
    c. set the HsqlServer errWriter to an instance of HsqlPrintWriter

> 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-latest.patch, 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.


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

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins closed OPENEJB-669.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

> 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
>            Assignee: karan singh malhi
>             Fix For: 3.0
>
>         Attachments: Openejb-669-latest.patch, 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.


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

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521958 ] 

David Blevins commented on OPENEJB-669:
---------------------------------------

Is there some way to maybe wrap a PrintWriter around Logger.info(...)  
and set it on setLogWriter then do the same for a PrintWriter around  
Logger.error(...) for setErrWriter?  I know I tried something similar  
with Castor once.  Think it's Log4jPrintWriter in the utils package.

Would that allow us to still get the hsql messages, but ensure they  
go to log4j?

-David





> 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.


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

Posted by "karan singh malhi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

karan singh malhi updated OPENEJB-669:
--------------------------------------

    Attachment: openejb-669.patch

Added patch. Set logwriter, errWriter to null and setSilent to true

> 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.