GithubHelp home page GithubHelp logo

jlv's People

Contributors

rdiachenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jlv's Issues

Quick search by text in logview

Add possibility to make a quick search in logview by text.

F.e.: press Ctrl-F, enter a search text to filter the logview's content and display the only logs with this text.

Consider to not use a separate dialog. Probably, a good way will be to use text field which will be appeared in logview's panel by clicking Ctrl-F or pressing 'Quick search' button on the logview's panel.

Rename logs table in db

Be more specific and rename logs table in db to log4j1 table in order for supporting other logging systems and give to db tables such names.

Create a simple server for logging events

  • Create server which will be listening for logging events from log4j and handle them.
  • Specify hostname and port number.
  • Verify server's functionality by writing unit tests.

Tag each release

Modify deploy.sh script so that each jlv release a new tag will be created in master branch.

Write unit tests for logging server and client

Currently there are Log4jServerRunner for starting logging server and TestLoggingApp (a client which logs some test messages using log4j-test.properties configuration). The client's log messages goes to server through socket; server creates a separate thread for the client and this thread collect all log messages into jlv.h2.db data base.

We need to avoid these server and client runners and put their logic into test in order do not run them manually.

Test should:

  • run server
  • run client
  • wait until client finishes his work
  • stop server
  • check that jlv.h2.db file was created
  • validate "logs" table in db.
    Read this article for the first step.

Unit tests and code coverage

  • Analyze code coverage by using such tools as Emma etc.
  • Write unit tests and try to cover about 80% of main functionality (jlv project)

Provide deploy environment

  • create deploy script for update-site
  • consider using github as a remote maven repo: upload there com.rdiachenko.jlv:jlv artifact when building jlv project and download it to dependencies folder in jlv-plugin project during its build
  • look at maven deploy plugin

Migrate plugin to support Eclipse 4

When running under Eclipse 4 there are NullPointerExceptions occurred in this code:

private void initServerActions() {
startServerAction = ((ActionContributionItem) getViewSite().getActionBars().getToolBarManager()
.find(START_SERVER_ACTION_ID)).getAction();
stopServerAction = ((ActionContributionItem) getViewSite().getActionBars().getToolBarManager()
.find(STOP_SERVER_ACTION_ID)).getAction();
.... }

Migrate jlv to support Eclipse 4. Read for more details about Eclipse 4 model: http://www.vogella.com/articles/EclipseRCP/article.html and here http://wiki.eclipse.org/Eclipse4/Tutorials

Hibernate logs support

Reported by @romani, Nov 2, 2010

Add functionality to support:

  • Hibernate logs detection
  • View Hibernate sql as formatted text + inline arguments for convenient copy/pase to SQL Developer or other application.
  • collapse few lines of Hibenate logs (SQL + Binded arguments to one row)

Improve deployment process

Current approach:

  1. cd jlv
  2. mvn clean install
  3. cd jlv-eclipse-plugin
  4. open parent pom and change version (release version without -SNAPSHOT)
  5. mvn org.eclipse.tycho:tycho-versions-plugin:set-version
  6. mvn clean install
  7. go to jlv-update-site/target/repository/ and copy all content
  8. git checkout repo
  9. paste the copied content to eclipse folder
  10. make commit and push

We need to avoid such complexity by optimizing the deployment process.

Create server settings page

Create settings page for logging server in jlv preferences. Server's settings should be stored in eclipse plugin prefs. Look at ui part and general parameters in the attached image.


server_preferences

EOFException when reading from socket

[22-Apr-2013-13:07:36:539][51][ClientThread][WARN]: Exception occur while reading object from socket input stream:
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2553)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at com.rdiachenko.jlv.log4j.socketappender.ClientThread.run(ClientThread.java:40)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Steps to reproduce the exception:

  1. Run server
  2. Run client
    Exception occurred after client's last message

Minor fixes

  • Increase message length in db in order to store more complicated and long messages
  • Increase the height for message text area in detailed log view

Provide support for other logging systems

Currently jlv supports only log4j clients.

We should provide support for other mainstream logging systems such as logback, commons logging, ...

A new client should be created for each new logging system (example: ClientThread).

Create preferences in eclipse plugin in order the user can choose between the supported clients. Default client should be log4j logging system. When user choose another client, the server should switch to the new client and use it to provide new logs.

Preference for quick search field

Add preference to quick search field to store its open/closed state.
Currently it is always displayed in the logview's bottom. We should store its state when pressing on quick search button in the logview's toolbar.

Remove unnecessary code

I found this old code in LogDaoIml:

    public LogDaoImpl() {
logEventListener = new LogEventListener() {
public void handleLogEvent(final Log log) {

}

public void endLogEvent() {

}
};
LogEventContainer.addListener(logEventListener);
}

Consider removing it and look for other places and remove all unnecessary code.

Create simple logging view

Create logging view for displaying logs. Logs should be displayed in the table. For each log field a separate column should be existed. See attached image for general overview.


logview_description

Increase size of LOGINFO field in db

To avoid such bugs increase size for LOGINFO fileld in db:

Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column 
"LOCINFO VARCHAR(100) DEFAULT ''":

Fix Unhandled event loop exception

Exception occurred when there are a lot of logs come via socket (tested on 500000 logs) and displayed in logview.

!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.core.runtime.AssertionFailedException: null argument:)
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3717)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3366)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.jface.viewers.StructuredViewer.assertElementsNotNull(StructuredViewer.java:599)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1011)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:721)
at org.eclipse.jface.viewers.AbstractTableViewer.getRawChildren(AbstractTableViewer.java:1090)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1067)
at org.eclipse.jface.viewers.AbstractTableViewer.internalVirtualRefreshAll(AbstractTableViewer.java:677)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:652)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:637)
at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1508)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1506)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:544)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1465)
at com.rdiachenko.jlv.ui.views.JlvView.refreshViewer(JlvView.java:108)
at com.rdiachenko.jlv.ui.views.JlvViewController$4.run(JlvViewController.java:139)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
... 24 more

Provide detailed logview

Create a separate view which shows detailed info about log. Detailed logview should be opened when clicking on log in logview.

Preference for viewer buffer size

Currently logview can display only 5000 last logs and this amount is hardcoded. We need to single out viewer buffer size in eclipse preferences in order to allow user to control it himself.
main_preferences

Too wide rows in logview

Sometimes, when logs come and are displayed in logview, the logview's rows become too wide. See screenshot.
jlv_view_table

JLV Eclipse plugin build failure

JLV Eclipse plugin build failed after executing the following command:

$ mvn -f parent-pom.xml clean install -X
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.16.0:validate-id (default-validate-id) on project jlv-eclipse-plugin: The Maven artifactId (currently: "jlv-eclipse-plugin") must be the same as the bundle symbolic name (currently: "com.rdiachenko.jlv") -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.16.0:validate-id (default-validate-id) on project jlv-eclipse-plugin: The Maven artifactId (currently: "jlv-eclipse-plugin") must be the same as the bundle symbolic name (currently: "com.rdiachenko.jlv") at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: The Maven artifactId (currently: "jlv-eclipse-plugin") must be the same as the bundle symbolic name (currently: "com.rdiachenko.jlv") at org.eclipse.tycho.buildversion.ValidateIdMojo.failBuildDueToIdMismatch(ValidateIdMojo.java:26) at org.eclipse.tycho.buildversion.ValidateIdMojo.execute(ValidateIdMojo.java:18) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more

Add project's description

We need to describe the project, its main features and goals. Provide screenshots and howto use page.

Add user ability to substitute LogLevel text by icon

Reported by RomanIvanovJR, Nov 14, 2011

Log Levels are limited - FATAL, ERROR, FINE, FINEST, .... .
But displaying a text of them is space consuming.

Let user and option in preferences to show icons instead of text and make this column as narrow as possible with tool-tip text for quick reference. Dictionary of images will be shown in Preferences.

Remember that in major cases user care only about Message column - so we need to provide an options to make this column as wide(easy to read) as possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.