You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2010/09/28 18:34:47 UTC

[jira] Created: (WHIRR-106) improve logging in whirr cli

improve logging in whirr cli
----------------------------

                 Key: WHIRR-106
                 URL: https://issues.apache.org/jira/browse/WHIRR-106
             Project: Whirr
          Issue Type: Bug
          Components: cli
    Affects Versions: 0.1.0
            Reporter: Patrick Hunt
             Fix For: 0.2.0
         Attachments: log4j.properties

I believe there are two issues here:

1) services are not logging anything 
2) logging output does not seem to be setup correctly

for 1) we should add info level (at least) messages to the service implementations to indicate progress
for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Commented: (WHIRR-106) improve logging in whirr cli

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916549#action_12916549 ] 

Adrian Cole commented on WHIRR-106:
-----------------------------------

ahh sure.  I misunderstood.  well, if you end up choosing slf4j, jclouds can make an adapter to use it.

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Updated: (WHIRR-106) improve logging in whirr cli

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

Tom White updated WHIRR-106:
----------------------------

    Attachment: WHIRR-106.patch

Here's a minor update that logs the Hadoop cluster web UI URL.

bq. if you end up choosing slf4j, jclouds can make an adapter to use it. 

Good to hear. Also, have you considered using slf4j in jclouds?

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Commented: (WHIRR-106) improve logging in whirr cli

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916412#action_12916412 ] 

Adrian Cole commented on WHIRR-106:
-----------------------------------

for logging, it is pretty easy to interface into the jclouds logging system.

using context().utils().loggerFactory()  will give you a logger instance based on the scope you specify.

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Updated: (WHIRR-106) improve logging in whirr cli

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

Tom White updated WHIRR-106:
----------------------------

    Attachment: WHIRR-106.patch

* Added logging to each service. This is at info level, and is useful for a fairly high-level view of what Whirr is doing.
* The CLI now logs info level to the console and everything else (for org.apache.whirr and jclouds.compute categories) to a file called whirr.log. The jclouds.compute category is nice because it logs things like what the runscript output is, which saves SSHing to the instances.
* Added an appender to the test log4j.xml files for the whirr logging output.
* Also fixed the test log4j.xml files to have a root-level appender (log4j was complaining about this before).
* Changed the poms so that log4j is used for tests and for the CLI, but otherwise is not a dependency (slf4j is used as the logging facade). In principle this means that clients using Whirr as a library could use any logging supplier.

Patrick mentioned offline that it might be nice to have an interface between Whirr and jclouds which does a lot of the service logging for you (i.e. the writer of a Whirr service). I agree, but think this is bigger in scope and probably belongs in another JIRA.

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Commented: (WHIRR-106) improve logging in whirr cli

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916545#action_12916545 ] 

Tom White commented on WHIRR-106:
---------------------------------

Thanks Adrian. For Whirr I think it makes sense to use a logging facade like slf4j, rather than tightly binding to jclouds logging system.

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Updated: (WHIRR-106) improve logging in whirr cli

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

Tom White updated WHIRR-106:
----------------------------

      Status: Patch Available  (was: Open)
    Assignee: Tom White

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Updated: (WHIRR-106) improve logging in whirr cli

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

Tom White updated WHIRR-106:
----------------------------

    Attachment: WHIRR-106.patch

Synced with trunk.

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch, WHIRR-106.patch, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Commented: (WHIRR-106) improve logging in whirr cli

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917403#action_12917403 ] 

Adrian Cole commented on WHIRR-106:
-----------------------------------

wrt slj4j in jclouds, I've considered it.  Personally, I'm not a big fan of using the classloader as a DI tool.  I do like the recent shift to null loggers, which we did over a year ago.  However, there's really never been a log-related feature we've needed and are lacking.

More importantly, slf4j isn't defacto: rather it is one of several popular log apis.  While light, it still represents a dependency those who just use log4j, java logging (or run in google appengine, android, etc) wouldn't care to bring in.  Log veneers are extremely short and easy to maintain code.  It is an easy burden to accept on behalf of the users.

That said, we will make a slf4j adapter, so that those who use it can have that supported in jclouds.  That makes total sense and I've logged this below:

http://code.google.com/p/jclouds/issues/detail?id=374

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch, WHIRR-106.patch, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Updated: (WHIRR-106) improve logging in whirr cli

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

Patrick Hunt updated WHIRR-106:
-------------------------------

    Attachment: log4j.properties

attaching a sample log4j.properties which outputs info level messages to the console, debug to a whirr_cli.log file in the cwd.

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Commented: (WHIRR-106) improve logging in whirr cli

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917713#action_12917713 ] 

Patrick Hunt commented on WHIRR-106:
------------------------------------

+1, lgtm, tests pass and output from cli is more informative.

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch, WHIRR-106.patch, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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


[jira] Updated: (WHIRR-106) improve logging in whirr cli

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

Tom White updated WHIRR-106:
----------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Thanks for the review, Patrick. I've just committed this. 

> improve logging in whirr cli
> ----------------------------
>
>                 Key: WHIRR-106
>                 URL: https://issues.apache.org/jira/browse/WHIRR-106
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.1.0
>            Reporter: Patrick Hunt
>            Assignee: Tom White
>             Fix For: 0.2.0
>
>         Attachments: log4j.properties, WHIRR-106.patch, WHIRR-106.patch, WHIRR-106.patch
>
>
> I believe there are two issues here:
> 1) services are not logging anything 
> 2) logging output does not seem to be setup correctly
> for 1) we should add info level (at least) messages to the service implementations to indicate progress
> for 2) we should include a default log4j.properties (or xml) in the shaded jar which has sane defaults (see attachment for an example I whipped up and am using myself)

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