You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Filippo Diotalevi (JIRA)" <ji...@apache.org> on 2009/04/22 22:40:47 UTC

[jira] Created: (FELIX-1052) [PATCH] Log shell command

[PATCH] Log shell command
-------------------------

                 Key: FELIX-1052
                 URL: https://issues.apache.org/jira/browse/FELIX-1052
             Project: Felix
          Issue Type: New Feature
          Components: Log Service, Shell
            Reporter: Filippo Diotalevi
            Priority: Minor


It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
The attached bundle define a shell Command to display log entries.

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


[jira] Commented: (FELIX-1052) [PATCH] Log shell command

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701719#action_12701719 ] 

Richard S. Hall commented on FELIX-1052:
----------------------------------------

I am not sure it makes sense to make a completely separate subproject for this. Perhaps it would make more sense to put it in the log service subproject as an option command, similar to the obr command in the bundle repository.

The downside, I suppose, is that it cannot be used independently with out log service implementations. Another option would be to include it in shell, but I would prefer log service. I suppose another possibility is to create another subproject that contains an "extended" set of shell commands.

Any other thoughts?

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: log.shell.zip
>
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Updated: (FELIX-1052) [PATCH] Log shell command

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

Filippo Diotalevi updated FELIX-1052:
-------------------------------------

    Attachment: log.shell.zip

Bundle implementing the "log" command for the Apache Shell Console. It is very simple and quick to integrate in Felix code base; it is structured following the conventions used by other Felix subprojects.
Requires Log Service and Felix Shell.

Usage:
log [<max log entries>] [error | warn | info | debug]

examples:
1)   log  ->  show recent logs
2)   log  5  -> show latest 5 logs
3)   log warn  -> show only warn (or more critical) logs
4)   log info  5  -> show the latest 5 logs with severity info or more

Bundle contents:
----------------------
log.shell/
log.shell/LICENSE
log.shell/NOTICE
log.shell/pom.xml
log.shell/src/
log.shell/src/main/
log.shell/src/main/java/
log.shell/src/main/java/org/
log.shell/src/main/java/org/apache/
log.shell/src/main/java/org/apache/felix/
log.shell/src/main/java/org/apache/felix/log/
log.shell/src/main/java/org/apache/felix/log/shell/
log.shell/src/main/java/org/apache/felix/log/shell/Activator.java
log.shell/src/main/java/org/apache/felix/log/shell/LogCommand.java
log.shell/src/main/java/org/apache/felix/log/shell/LogOptions.java
log.shell/src/test/
log.shell/src/test/java/
log.shell/src/test/java/org/
log.shell/src/test/java/org/apache/
log.shell/src/test/java/org/apache/felix/
log.shell/src/test/java/org/apache/felix/log/
log.shell/src/test/java/org/apache/felix/log/shell/
log.shell/src/test/java/org/apache/felix/log/shell/LogOptionsTest.java



> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: log.shell.zip
>
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Updated: (FELIX-1052) Add log shell command

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-1052:
-----------------------------------

    Affects Version/s: shell-1.2.0
        Fix Version/s:     (was: shell-1.2.0)
                       shell-1.4.0

> Add log shell command
> ---------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>    Affects Versions: shell-1.2.0
>            Reporter: Filippo Diotalevi
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: shell-1.4.0
>
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Resolved: (FELIX-1052) Add log shell command

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-1052.
------------------------------------

    Resolution: Fixed

I have committed the patch, please verify that everything is ok and close if you are satisfied. Thanks!

> Add log shell command
> ---------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>    Affects Versions: shell-1.2.0
>            Reporter: Filippo Diotalevi
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: shell-1.4.0
>
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Updated: (FELIX-1052) [PATCH] Log shell command

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

Clement Escoffier updated FELIX-1052:
-------------------------------------

    Remaining Estimate: 0h
     Original Estimate: 0h

Hi, 

I agree with Stuart, the log command should be in the shell bundle (importing/containing/exporting org.osgi.service.log 1.3.0).
I'm not against creating a separate bundle with additional commands, just that the log command will be definitely useful. So makes sense for me to add it in the shell bundle.

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Closed: (FELIX-1052) Add log shell command

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

Filippo Diotalevi closed FELIX-1052.
------------------------------------


> Add log shell command
> ---------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>    Affects Versions: shell-1.2.0
>            Reporter: Filippo Diotalevi
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: shell-1.4.0
>
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Updated: (FELIX-1052) Add log shell command

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-1052:
-----------------------------------

    Fix Version/s: shell-1.2.0
          Summary: Add log shell command  (was: [PATCH] Log shell command)

> Add log shell command
> ---------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: shell-1.2.0
>
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Updated: (FELIX-1052) [PATCH] Log shell command

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

Filippo Diotalevi updated FELIX-1052:
-------------------------------------

    Attachment: FELIX-1052.patch

Attached a patch for the Apache Felix Shell to implement the log command.

This patch adopt Stuart's suggestion to import/export org.osgi.service.log in the shell bundle.

The usage of the log command is explained in a previous comment; if no log service is present in the platform, an error message is displayed. 

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Assigned: (FELIX-1052) [PATCH] Log shell command

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall reassigned FELIX-1052:
--------------------------------------

    Assignee: Richard S. Hall

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Assignee: Richard S. Hall
>            Priority: Minor
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Commented: (FELIX-1052) [PATCH] Log shell command

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701811#action_12701811 ] 

Filippo Diotalevi commented on FELIX-1052:
------------------------------------------

Actually, I didn't want to create a separate bundle, but the 2 options you mentions have some problems:

1) integrated in Felix Log Service. The downside is that the "log" command won't appear with other log service implementations.

2) integrated in Felix Shell. That was my first choice, but that means you have to add the "org.osgi.service.log" import-package to Felix Shell and therefore requires the installation of the osgi compendium or of the Felix Log Service (which exports org.osgi.service.log).

So I followed the example of the dependencymanager bundle that has a separate dependencymanager.shell.

Of course it's easy and quick to port the code in another bundle, but I'm not sure what the best choice.

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: log.shell.zip
>
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Commented: (FELIX-1052) [PATCH] Log shell command

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701815#action_12701815 ] 

Stuart McCulloch commented on FELIX-1052:
-----------------------------------------

For 2) you could always include the "org.osgi.service.log" package in the shell bundle, then import and export it so it's substitutable.
That's what a lot of other Felix sub-projects do when they want to optionally use a service and don't want to rely on an extra bundle.

(another option might be to use an optional import and/or reflection, but that's more messy)

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: log.shell.zip
>
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Commented: (FELIX-1052) [PATCH] Log shell command

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702251#action_12702251 ] 

Filippo Diotalevi commented on FELIX-1052:
------------------------------------------

Agreed. If you check the second patch, it follows this approach, adding the log command to the shell bundle. org.osgi.service.log is imported contained and exported.

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: FELIX-1052.patch, log.shell.zip
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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


[jira] Commented: (FELIX-1052) [PATCH] Log shell command

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701831#action_12701831 ] 

Filippo Diotalevi commented on FELIX-1052:
------------------------------------------

I didn't consider the idea of including the "org.osgi.service.log" package, but it sounds good to me.
Let me give a try

> [PATCH] Log shell command
> -------------------------
>
>                 Key: FELIX-1052
>                 URL: https://issues.apache.org/jira/browse/FELIX-1052
>             Project: Felix
>          Issue Type: New Feature
>          Components: Log Service, Shell
>            Reporter: Filippo Diotalevi
>            Priority: Minor
>         Attachments: log.shell.zip
>
>
> It is currently not possible to display recent logs (created with the Log Service) using the Apache Felix Shell.
> The attached bundle define a shell Command to display log entries.

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