Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Orion/How Tos/How to enable log service support in Orion

< Orion‎ | How Tos
Revision as of 07:59, 22 July 2013 by Maciej.bendkowski.gmail.com (Talk | contribs) (Local instance configuration)

Orion log provider support is a group of built-in extensions, which enable you to request server logs using Orion itself. You may require file-based logs from a running Orion instance, process them in your plugins, save them in the cloud, or directly download them to your local machine. Since the log provider is disabled by default, special configuration is required to enable this feature.

Local instance configuration

By default, Orion uses a console-based log appender. To change this behavior, edit your run configuration and provide a custom logback configuration file using the -Dlogback.configurationFile=/path/to/my/custom/logback-configuration.xml argument. This will override Orion log configuration and get you full access to your Orion instance log strategy. The log provider feature supports only file-based appenders, so you have to ensure there's at least one file appender present. One example file-based logback configuration may be found in the org.eclipse.orion.server.logback.config server bundle. For more logback documentation, please visit [http://logback.qos.ch/manual/appenders.html#FileAppender].

Another simple example configuration file:

<configuration>
  <!-- See documentation at http://logback.qos.ch/manual/joran.html -->
  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>/opt/logs/orion.log</file>
    <append>true</append>
    <encoder>
      <pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
    </encoder>
  </appender>
  
  <!-- Prints successful and failed logins -->
  <logger name="org.eclipse.orion.server.login" level="INFO"/>

  <!-- Prints user account creations and deletions -->
  <logger name="org.eclipse.orion.server.account" level="INFO"/>

  <!-- Prints information on locating and reading the server configuration file -->
  <logger name="org.eclipse.orion.server.config" level="INFO"/>

  <root level="WARN">
    <appender-ref ref="FILE" />
  </root>
</configuration>

In order to use the log provider feature, one more configuration step is required. Uncomment the orion.logs.logProviderEnabled=true entry in the Orion configuration file. Please note this configuration entry is most likely to change and be replaced with a more user-role-based solution. The server side should now be configured and ready to use.

Pre-buit instance

Please follow the instructions in the Local instance configuration using the orion.ini file to configure Orion run arguments.

Client UI configuration

The client side UI gives you a shell plugin to manage basic log provider features. By default, the plugin is not present in your default plugin set list, so you have to install it manually using the shell/plugins/shellLogProviderPlugin.html plugin link. For more information on how to install Orion plugins, please see: Orion/How_Tos/Installing_A_Plugin.

Basic usage

Go to your shell and type help to view all available plugins: Log-provider-ui-1.png

To list all file-based appenders in the current logger context type logs:

Log-provider-ui-2.png

To get the log file content for a given appender, type logs {appenderName}: Log-provider-ui-3.png

To get more verbose info on a particular log file type logs true {appenderName}: Log-provider-ui-4.png

Download logs

If you wish to download your log file content, you may save the logs {appenderName} command result in a file within the Orion workspace and then download it in a raw form to your local machine. Another approach would be to use the server side API directly from your browser.

Back to the top