You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2008/05/17 03:07:55 UTC

[jira] Created: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

TThreadPoolServer should log exceptions and events via log4j instead of to stdout
---------------------------------------------------------------------------------

                 Key: THRIFT-12
                 URL: https://issues.apache.org/jira/browse/THRIFT-12
             Project: Thrift
          Issue Type: New Feature
          Components: Library (Java)
            Reporter: Bryan Duxbury
            Priority: Minor


It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Commented: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609302#action_12609302 ] 

Bryan Duxbury commented on THRIFT-12:
-------------------------------------

Are we waiting on anything to commit this patch?

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>         Attachments: LoggingInsteadOfStandardIO.patch
>
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Commented: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

Posted by "Carl Byström (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597725#action_12597725 ] 

Carl Byström commented on THRIFT-12:
------------------------------------

The TThreadPoolServer doesn't do much logging. It does log the exceptions to stdout (printStackTrace), but that's about it. Log4j would definitely help here, logging to stdout isn't good practice.
But considering Thrift is a library, not an application. Taking a more generic approach, such as SLF4J is a better alternative. (SLF4J is a light-weight logging wrapper, very suitable for code libraries where you don't know your users logging preferences, see http://www.slf4j.org/ quite a few Apache projects use it). However, if we are looking at keeping dependencies to a minimum, perhaps the built-in JDK logger is enough? Maybe there are some license issues with Thrift being an Apache project now?

I would say +1 vote for SLF4J anywho

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Commented: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

Posted by "Mark Slee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602043#action_12602043 ] 

Mark Slee commented on THRIFT-12:
---------------------------------

This patch looks good to me. I also agree with David that java.util.logging is preferable here, as one of the main philosophies of Thrift is to be as lightweight and dependency-free as possible.

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>         Attachments: LoggingInsteadOfStandardIO.patch
>
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Updated: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

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

Bryan Duxbury updated THRIFT-12:
--------------------------------

    Patch Info: [Patch Available]

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>         Attachments: LoggingInsteadOfStandardIO.patch
>
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Assigned: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

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

David Reiss reassigned THRIFT-12:
---------------------------------

    Assignee: Johan Stuyts  (was: David Reiss)

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Johan Stuyts
>            Priority: Minor
>         Attachments: LoggingInsteadOfStandardIO.patch
>
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Updated: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

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

Johan Stuyts updated THRIFT-12:
-------------------------------

    Attachment: LoggingInsteadOfStandardIO.patch

This patch makes error messages go to a JDK logger instead of standard out for the following classes:
* {{TSimpleServer}}
* {{TThreadPoolServer}}
* {{TServerSocket}}
* {{TIOStreamTransport}}
* {{TSocket}}

Please review the log level and/or the messages used in the log statements.

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>         Attachments: LoggingInsteadOfStandardIO.patch
>
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Commented: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600377#action_12600377 ] 

David Reiss commented on THRIFT-12:
-----------------------------------

I would prefer java.util.logging, because otherwise it would be impossible to use Thrift without installing Log4j or SLF4J.

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Commented: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597860#action_12597860 ] 

Bryan Duxbury commented on THRIFT-12:
-------------------------------------

I like the idea of using SLF4J because it doesn't tie our consumers into a single logging framework. Are there any objections to adding it a a dependency?

By the way, there is no license issue with using SLF4J in an Apache project, as their licenses are compatible.

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Resolved: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

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

David Reiss resolved THRIFT-12.
-------------------------------

    Resolution: Fixed
      Assignee: David Reiss

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: David Reiss
>            Priority: Minor
>         Attachments: LoggingInsteadOfStandardIO.patch
>
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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


[jira] Commented: (THRIFT-12) TThreadPoolServer should log exceptions and events via log4j instead of to stdout

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606466#action_12606466 ] 

Bryan Duxbury commented on THRIFT-12:
-------------------------------------

Agree, we should commit this patch.

> TThreadPoolServer should log exceptions and events via log4j instead of to stdout
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-12
>                 URL: https://issues.apache.org/jira/browse/THRIFT-12
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>         Attachments: LoggingInsteadOfStandardIO.patch
>
>
> It would be extremely useful if it was easier to control the error and event logging from the TThreadPoolServer. This would make debugging and management much easier. Log4j has a fair amount of momentum as a project - would there be any objection to bundling log4j and using that in the server?

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