Bug 413037 - Log provider service support
Summary: Log provider service support
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Server (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 4.0 M1   Edit
Assignee: Maciej Bendkowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2013-07-16 04:01 EDT by Maciej Bendkowski CLA
Modified: 2013-09-23 04:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Bendkowski CLA 2013-07-16 04:01:25 EDT
As a part of bug 411785 provide a log service which would give direct read-only server log access. The service requires a file-based log strategy and a custom VM flag to run properly. As the user role aspect of Orion gets enhanced the flag should not be required anymore and changed to privileged user access only. Until that moment, if enabled, read-only access will be available for all logged users.
Comment 1 Maciej Bendkowski CLA 2013-07-17 09:04:06 EDT
Pushed to master the first server part: 
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=c416cd738aa8127b6fb511848c4e936b5e808132

The server side provides a partial REST API for accessing log files.
Currently only-read access is implemented, only file-based appenders in the logger context are visible. Log files are available both under a REST download link and JSON object wrapper. Next steps:

1. Implement a client-side interface: For now, the best suited solution would be a shell plugin, for both filtering and download access until we manage to create a fully functional user-role solution.
2. Opaque the non-download REST API in TaskJobs.
3. Enable RollingFileAppender history access.

For security reasons, the log service is enabled when the -DENABLE_LOG_PROVIDER VM flag is set to true. Only file-based logs are supported and for that reason, if someone wishes to check this feature out, change your default console-based logback configuration. An example logback-production.xml is located is the logback.config bundle. To provide a logback configuration at runtime use the -Dlogback.configurationFile flag.

I'll keep this bug open for tracking the progress on this feature.
Comment 2 Maciej Bendkowski CLA 2013-07-17 09:07:47 EDT
Provided API:

1. /logs/appenders - lists all file-based appenders in the current logger context.
2. /logs/appenders/{APPENDER-NAME} - provides read-only access to the log-file associated with the given appender.
3. /logs/appenders/{APPENDER-NAME}/download - raw-form log file download
Comment 3 Maciej Bendkowski CLA 2013-07-24 08:42:15 EDT
During the work in bug 413515, server log API has changed.
/log - provides a list of file-based appenders in current logger context. Each resource has an appropriate Location and DownloadLocation attribute.
Comment 4 Maciej Bendkowski CLA 2013-07-24 08:46:04 EDT
Further update:

bug 413262 - we use a configuration entry instead of a VM flag now.
bug 413161 - each non download operation uses now Jobs.
Comment 5 Maciej Bendkowski CLA 2013-08-02 08:40:33 EDT
Bug 413162: RollingFileAppenders and archived log files are now supported.
Comment 6 Maciej Bendkowski CLA 2013-08-13 06:25:52 EDT
Bug 413627 - Dynamic access to logger levels in now supported. Closing.