meydrew / otroslogviewer

Automatically exported from code.google.com/p/otroslogviewer
0 stars 0 forks source link

Right align text in logger column #302

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A common convention in java is to use the fully qualified class name as the 
logger name with log4j.

When working with longer package names in olv this means the logger column must 
be rather wide to be able to see the significant part...the class name.

com.foo-enterprises.someComponent.somePackage.MyClass.

It would be ideal if olv could elide the left part and/or right align the 
logger name such that the "MyClass" portion is visible even when logger column 
is narrow.

Original issue reported on code.google.com by mjmeye...@gmail.com on 12 May 2014 at 6:18

GoogleCodeExporter commented 9 years ago
I've got a hot bitcoin to give if this feature get some love.

Original comment by mjmeye...@gmail.com on 5 Dec 2014 at 3:09

GoogleCodeExporter commented 9 years ago
Hi.
Version 1.3.0 has just been released. Issue 70 was introduced  
https://code.google.com/p/otroslogviewer/issues/detail?id=70. So if you have 
class:
com.foo-enterprises.someComponent.somePackage.Class
you can set in preferences->Log event display
  com.foo-enterprises.someComponent={SomeComp}
your Class in will be displayed as:
  {SomeComp}.somePackage.Class

You can check screenshots. Is it enough for you?

Original comment by krzyszto...@gmail.com on 5 Dec 2014 at 10:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by otros.sy...@gmail.com on 5 Dec 2014 at 9:06

GoogleCodeExporter commented 9 years ago
Interesting. I will check out 1.3.0 this weekend. I'm stuck using 
socketAppenders which dont send the class field so hoping that this 
abbreviation will be applied to the logger field as well.

Thanks much.

Original comment by mjmeye...@gmail.com on 5 Dec 2014 at 9:20

GoogleCodeExporter commented 9 years ago
Here is a screenshot how this functionality will looks like.

Original comment by otros.sy...@gmail.com on 5 Dec 2014 at 10:58

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Snapshot version can be downloaded from sf.net: 
https://sourceforge.net/projects/otroslogviewer/files/1.3.1-SNAPSHOT/

Original comment by otros.sy...@gmail.com on 6 Dec 2014 at 10:13

GoogleCodeExporter commented 9 years ago
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
    at java.lang.String.substring(String.java:1907)
    at pl.otros.logview.gui.renderers.ClassWrapperRenderer.abbreviatePackagesToSingleLetter(ClassWrapperRenderer.java:76)

When the item in the CLASS slot of my otros parser is from log4j pattern %c, 
which is logger. Not all loggers have FQNs.

Original comment by mjmeye...@gmail.com on 6 Dec 2014 at 4:10

GoogleCodeExporter commented 9 years ago
Can you paste log fragment and log parser definition?

Original comment by otros.sy...@gmail.com on 6 Dec 2014 at 4:16

GoogleCodeExporter commented 9 years ago
my log4j pattern is: %-5p %d [%t] %c %c{1}: %m%n

my otros parser pattern is: LEVEL TIMESTAMP [THREAD] CLASS LOGGER:MESSAGE

line 6 of attached log is problem. not sure why.

Original comment by mjmeye...@gmail.com on 6 Dec 2014 at 4:54

Attachments:

GoogleCodeExporter commented 9 years ago
I have try to open test.log using your pattern. I do not have any problems ;(

Original comment by otros.sy...@gmail.com on 6 Dec 2014 at 7:05

Attachments:

GoogleCodeExporter commented 9 years ago
Can you check latest snapshot?
https://sourceforge.net/projects/otroslogviewer/files/1.3.1-SNAPSHOT/

Original comment by krzyszto...@gmail.com on 8 Dec 2014 at 2:44

GoogleCodeExporter commented 9 years ago

Original comment by otros.sy...@gmail.com on 23 Feb 2015 at 8:26