You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2008/11/05 02:00:46 UTC

[jira] Created: (ZOOKEEPER-216) Improve logging in C client

Improve logging in C client
---------------------------

                 Key: ZOOKEEPER-216
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-216
             Project: Zookeeper
          Issue Type: Improvement
          Components: c client
    Affects Versions: 3.0.0
            Reporter: Patrick Hunt
             Fix For: 3.1.0


While debugging a client issue we saw multiple areas for improvement in C logging.

It might be a good idea to also move to log4c. Anyone have experience with this? multithread an issue?


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


[jira] Updated: (ZOOKEEPER-216) Improve logging in C client

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

Patrick Hunt updated ZOOKEEPER-216:
-----------------------------------

    Fix Version/s:     (was: 3.2.0)
                   3.3.0
     Release Note: not a blocker for 3.2, moving to 3.3

> Improve logging in C client
> ---------------------------
>
>                 Key: ZOOKEEPER-216
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-216
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>             Fix For: 3.3.0
>
>
> While debugging a client issue we saw multiple areas for improvement in C logging.
> It might be a good idea to also move to log4c. Anyone have experience with this? multithread an issue?

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


[jira] Commented: (ZOOKEEPER-216) Improve logging in C client

Posted by "Chang Song (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928187#action_12928187 ] 

Chang Song commented on ZOOKEEPER-216:
--------------------------------------

I have used log4c in application that uses zookeeper. Then I removed it then move to syslog.
The only reason was its license. Remember that log4c is LGPL.
Now you no longer release your app with BSD, MIT, or Apache license.



> Improve logging in C client
> ---------------------------
>
>                 Key: ZOOKEEPER-216
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-216
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>             Fix For: 3.4.0
>
>
> While debugging a client issue we saw multiple areas for improvement in C logging.
> It might be a good idea to also move to log4c. Anyone have experience with this? multithread an issue?

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


[jira] Updated: (ZOOKEEPER-216) Improve logging in C client

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

Patrick Hunt updated ZOOKEEPER-216:
-----------------------------------

    Fix Version/s:     (was: 3.1.0)
                   3.2.0

> Improve logging in C client
> ---------------------------
>
>                 Key: ZOOKEEPER-216
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-216
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>             Fix For: 3.2.0
>
>
> While debugging a client issue we saw multiple areas for improvement in C logging.
> It might be a good idea to also move to log4c. Anyone have experience with this? multithread an issue?

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


[jira] Commented: (ZOOKEEPER-216) Improve logging in C client

Posted by "Chris Darroch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670859#action_12670859 ] 

Chris Darroch commented on ZOOKEEPER-216:
-----------------------------------------

A few specific ideas and areas of concern.

The threads spawned by a single connection handle may write to the log file at the same time.  Personally, this doesn't concern me overmuch; I'd prefer not to have the logging subsystem doing a lot of mutex locking just to ensure the occasional log entries don't collide.

More seriously, the logLevel and logStream variables in zk_log.c are global resources.  That means if a program opens several ZooKeeper connections, they all share the file descriptor, and so all connection handles are affected if any part of the program changes the log file descriptor.  There may also be a small possibility of collision that if one thread changes the log file descriptor while another is reading it (although it's just a pointer, so it depends on whether the pointer is updated atomically).

At any rate, it would be excellent to have per-connection-handle logging attributes (level and stream).

> Improve logging in C client
> ---------------------------
>
>                 Key: ZOOKEEPER-216
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-216
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>             Fix For: 3.2.0
>
>
> While debugging a client issue we saw multiple areas for improvement in C logging.
> It might be a good idea to also move to log4c. Anyone have experience with this? multithread an issue?

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