Git Product home page Git Product logo

lilith's Introduction

Lilith Build Status Coverage Status Maven Central

Lilith (@lilithapp) is a logging and access event viewer for Logback, log4j™, Log4j 2™ and java.util.logging.

Lilith

It has features roughly comparable to Chainsaw for log4j™, but with an emphasis on stability, high performance and throughput. In contrast to Chainsaw, it is handling received logging events using the hard disk instead of keeping them in memory. Because of this, it is able to handle millions of events from several sources at the same time.

Getting started...

...with Logback...

...and logback-classic SocketAppender.

Lilith is listening for logback-classic SocketAppender connections on port 4445 or port 4560.

A SocketAppender establishes a connection with exactly one host that is defined in the RemoteHost property.

Add the following to your applications logback.xml:

<appender name="LogbackClassic" class="ch.qos.logback.classic.net.SocketAppender">
  <RemoteHost>localhost</RemoteHost>
  <Port>4560</Port>
  <ReconnectionDelay>170</ReconnectionDelay>
  <IncludeCallerData>true</IncludeCallerData>
</appender>

You also have to attach the appender to some logger, e.g. the root logger...

<root level="INFO">
  <appender-ref ref="LogbackClassic"/>
</root>

... or a specific logger...

<logger name="foo.Bar" level="DEBUG">
  <appender-ref ref="LogbackClassic"/>
</logger>

Using logback-classic SocketAppender requires ch.qos.logback:logback-classic as runtime dependency.

Take a look at the Logback manual and the Lilith help for more information.

...and Lilith ClassicMultiplexSocketAppender.

Lilith is listening for Lilith ClassicMultiplexSocketAppender connections on port 10000 (compressed) and 10001 (uncompressed).

The Lilith ClassicMultiplexSocketAppender is a replacement for the logback-classic SocketAppender.

This appender, in contrast to logbacks, supports logger.debug("{} {}", new Object[]{foo, bar, throwable), i.e. if the last given parameter of a log message is a Throwable and it is not used up in the message pattern then it will be used as the Throwable of the LoggingEvent, similar to logger.debug(""+foo+" "+bar, throwable).

While logbacks appender is stream-based, i.e. it streams logging events using an ObjectOutputStream, the Lilith appender is message based, i.e. it sends logging events one after the other as single messages.

A message consists of an integer that specifies the number of bytes of the following event, followed by the bytes of the serialized event.

This has several benefits:

  • Sending to multiple remote hosts is supported while the event is only serialized once.
  • Events can (and should) be compressed using GZIP.
  • The appender supports heartbeat and timeout.
    • The event receiver can find out that the event sender connection died if a heartbeat is missing.
    • The event sender can find out that the event receiver connection died by means of a timeout This means that an application won't stop (at least not for very long) in case of network problem.

The multiplex appenders are now creating a UUID be default. This enables Lilith to reattach a connection to an existing view after the connection has been lost for some reason. It has the advantage that already executing filters won't have to be restarted for every new connection. The previous behavior can be enforced by disabling the creation of the UUID by means of <CreatingUUID>false</CreatingUUID> in the Logback configuration.

Add the following to your applications logback.xml:

<appender name="multiplex" class="de.huxhorn.lilith.logback.appender.ClassicMultiplexSocketAppender">
  <Compressing>true</Compressing>
  <!-- will automatically use correct default port -->
  <!-- Default port for compressed is 10000 and uncompressed 10001 -->
  <ReconnectionDelay>10000</ReconnectionDelay>
  <IncludeCallerData>true</IncludeCallerData>
  <RemoteHosts>localhost, 10.200.55.13</RemoteHosts>
  <!-- Alternatively:
  <RemoteHost>localhost</RemoteHost>
  <RemoteHost>10.200.55.13</RemoteHost>
  -->
  <!--
  Optional:
  <CreatingUUID>false</CreatingUUID>
  -->
</appender>

You also have to attach the appender to some logger, e.g. the root logger...

<root level="INFO">
  <appender-ref ref="multiplex"/>
</root>

... or a specific logger...

<logger name="foo.Bar" level="DEBUG">
  <appender-ref ref="multiplex"/>
</logger>

Using Lilith ClassicMultiplexSocketAppender requires de.huxhorn.lilith:de.huxhorn.lilith.logback.appender.multiplex-classic as runtime dependency.

Take a look at the Logback manual and the Lilith help for more information.

...and logback-classic with FileAppender.

Starting with Lilith 0.9.38 and Logback 0.9.19, you can write Lilith files directly from within Logback.

Those files can be opened by Lilith using either the Open command or drag&drop.

You can also use the tail and cat command available in the executable Lilith jar. This has the huge advantage that you can decide about the layout pattern of the log file output at the time you are executing the above commands instead of while defining the file appender.

  Commands:
    cat      Cat the given file.
      Usage: cat [options] 'cat' the given Lilith logfile.
        Options:
          -n, --number-of-lines   number of entries printed by 'cat'.
                                  Default: -1
          -p, --pattern           pattern used by 'cat'. See
                                  http://logback.qos.ch/manual/layouts.html#ClassicPatternLayout and
                                  http://logback.qos.ch/manual/layouts.html#AccessPatternLayout

    tail      Tail the given file.
      Usage: tail [options] 'tail' the given Lilith logfile.
        Options:
          -f, --keep-running      keep tailing the given Lilith logfile.
                                  Default: false
          -n, --number-of-lines   number of entries printed by 'tail'.
                                  Default: 20
          -p, --pattern           pattern used by 'tail'. See
                                  http://logback.qos.ch/manual/layouts.html#ClassicPatternLayout and
                                  http://logback.qos.ch/manual/layouts.html#AccessPatternLayout

Add the following to your applications logback.xml:

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
  <file>classic.lilith</file>
  <encoder class="de.huxhorn.lilith.logback.encoder.ClassicLilithEncoder">
    <IncludeCallerData>true</IncludeCallerData>
  </encoder>
</appender>

You also have to attach the appender to some logger, e.g. the root logger...

<root level="INFO">
  <appender-ref ref="FILE"/>
</root>

... or a specific logger...

<logger name="foo.Bar" level="DEBUG">
  <appender-ref ref="FILE"/>
</logger>

Using Lilith ClassicLilithEncoder requires de.huxhorn.lilith:de.huxhorn.lilith.logback.encoder.classic as runtime dependency.

Take a look at the Logback manual and the Lilith help for more information.

...and logback-access SocketAppender.

Lilith listens for logback-access SocketAppender connections on port 4570.

A SocketAppender establishes a connection with exactly one host that is defined in the RemoteHost property.

Add the following to your applications logback-access.xml:

<appender name="LogbackAccess" class="ch.qos.logback.access.net.SocketAppender"> 
  <RemoteHost>localhost</RemoteHost>
  <Port>4570</Port> 
  <ReconnectionDelay>170</ReconnectionDelay> 
  <IncludeCallerData>true</IncludeCallerData>
</appender>

and

<appender-ref ref="LogbackAccess" />

Using logback-access SocketAppender requires ch.qos.logback:logback-access as runtime dependency.

Take a look at the Logback manual and the Lilith help for more information.

...and Lilith AccessMultiplexSocketAppender.

Lilith is listening for Lilith AccessMultiplexSocketAppender connections on port 10010 (compressed) and 10011 (uncompressed).

The Lilith AccessMultiplexSocketAppender is a replacement for the logback-access SocketAppender.

While logbacks appender is stream-based, i.e. it streams logging events using an ObjectOutputStream, the Lilith appender is message based, i.e. it sends logging events one after the other as single messages.

A message consists of an integer that specifies the number of bytes of the following event, followed by the bytes of the serialized event.

This has several benefits:

  • Sending to multiple remote hosts is supported while the event is only serialized once.
  • Events can (and should) be compressed using GZIP.
  • The appender supports heartbeat and timeout.
    • The event receiver can find out that the event sender connection died if a heartbeat is missing.
    • The event sender can find out that the event receiver connection died by means of a timeout This means that an application won't stop (at least not for very long) in case of network problem.

Add the following to your applications logback-access.xml:

<appender name="multiplex" class="de.huxhorn.lilith.logback.appender.access.AccessMultiplexSocketAppender">
  <Compressing>true</Compressing> <!-- will automatically use correct default port -->
  <!-- Default port for compressed is 10010 and uncompressed 10011 -->
  <ReconnectionDelay>30000</ReconnectionDelay>
  <RemoteHosts>localhost</RemoteHosts>
</appender>

and

<appender-ref ref="multiplex" />

Using Lilith AccessMultiplexSocketAppender requires de.huxhorn.lilith:de.huxhorn.lilith.logback.appender.multiplex-access as runtime dependency.

Take a look at the Logback manual and the Lilith help for more information.

...and logback-access with FileAppender.

Starting with Lilith 0.9.38 and Logback 0.9.19, you can write Lilith files directly from within Logback.

Those files can be opened by Lilith using either the Open command or drag&drop.

You can also use the tail and cat command available in the executable Lilith jar. This has the huge advantage that you can decide about the layout pattern of the log file output at the time you are executing the above commands instead of while defining the file appender.

  Commands:
    cat      Cat the given file.
      Usage: cat [options] 'cat' the given Lilith logfile.
        Options:
          -n, --number-of-lines   number of entries printed by 'cat'.
                                  Default: -1
          -p, --pattern           pattern used by 'cat'. See
                                  http://logback.qos.ch/manual/layouts.html#ClassicPatternLayout and
                                  http://logback.qos.ch/manual/layouts.html#AccessPatternLayout

    tail      Tail the given file.
      Usage: tail [options] 'tail' the given Lilith logfile.
        Options:
          -f, --keep-running      keep tailing the given Lilith logfile.
                                  Default: false
          -n, --number-of-lines   number of entries printed by 'tail'.
                                  Default: 20
          -p, --pattern           pattern used by 'tail'. See
                                  http://logback.qos.ch/manual/layouts.html#ClassicPatternLayout and
                                  http://logback.qos.ch/manual/layouts.html#AccessPatternLayout

Add the following to your applications logback-access.xml:

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
  <file>classic.lilith</file>
  <encoder class="de.huxhorn.lilith.logback.encoder.access.AccessLilithEncoder">
    <IncludeCallerData>true</IncludeCallerData>
  </encoder>
</appender>

<appender-ref ref="FILE" />

Using Lilith AccessLilithEncoder requires de.huxhorn.lilith:de.huxhorn.lilith.logback.encoder.access as runtime dependency.

Take a look at the Logback manual and the Lilith help for more information.

...with Log4j 2™.

Lilith is listening for Log4j 2SocketAppender connections...

  • ...using SerializedLayout on port 4445 or port 4560.
  • ...using JsonLayout on port 12000.
  • ...using YamlLayout on port 12010.
  • ...using XmlLayout on port 12020.
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug">
  <appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} --- %msg%n"/>
    </Console>
    <Socket name="Socket-JSON" host="localhost" port="12000" protocol="TCP">
      <JsonLayout includeNullDelimiter="true" />
    </Socket>
    <Socket name="Socket-YAML" host="localhost" port="12010" protocol="TCP">
      <YamlLayout includeNullDelimiter="true" />
    </Socket>
    <Socket name="Socket-XML" host="localhost" port="12020" protocol="TCP">
      <XmlLayout includeNullDelimiter="true" />
    </Socket>
    <Socket name="Socket-Serialized" host="localhost" port="4560" protocol="TCP">
      <SerializedLayout />
    </Socket>
  </appenders>
  <loggers>
    <root level="all">
      <appender-ref ref="Console"/>
      <appender-ref ref="Socket-JSON"/>
      <appender-ref ref="Socket-YAML"/>
      <appender-ref ref="Socket-XML"/>
      <appender-ref ref="Socket-Serialized"/>
    </root>
  </loggers>
</configuration>

SerializedLayout has been deprecated in Log4j2 2.9.0. You should instead use one one of the other options.

Take a look at the Log4j 2™ manual for more information.

...with log4j™.

Lilith is listening for log4jSocketAppender connections on port 4445 or port 4560.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  <appender name="socket" class="org.apache.log4j.net.SocketAppender">
    <param name="Application" value="YourApplication"/>
    <param name="locationInfo" value="true"/>
    <param name="Port" value="4560"/>
    <param name="RemoteHost" value="127.0.0.1"/>
    <param name="ReconnectionDelay" value="10"/>
  </appender>
    
  <root>
    <priority value ="ALL" />
    <appender-ref ref="socket" />
  </root>
</log4j:configuration>

Take a look at the log4j™ manual for more information.

...with java.util.logging.SocketHandler.

Some people are forced to use java.util.logging. If you are one of those poor souls, you have my deepest sympathy. Seriously.

Lilith is listening for java.util.logging SocketHandler connections on port 11020.

If you are not exactly forced to keep using java.util.logging I'd seriously suggest to consider a switch to the SLF4J/Logback combination.

The only missing feature that java.util.logging has to offer are user-defined log-levels, albeit very, very poorly implemented. If you are actually using this feature then you are risking a memory leak. It would be a wise decision to use the SLF4J-Marker-support instead.

The java.util.logging SocketHandler does also have one major downside compared to all alternatives:

  • It will only send the top-most exception of an exception-hierarchy. You won't be able to see the root-cause(s) of an exception.
  • Suppressed exceptions, as introduced in Java 7, are also ignored.

Check out this list of reasons to prefer logback over log4j™ for a quite detailed overview of the advantages you'll get if you decide to take the dive. While this page isn't related to java.util.logging it will still give you a very good summary of all the nice features you'll get.

Last but not least, you'd be able to use the Lilith ClassicMultiplexSocketAppender, a partially asynchronous appender designed for high-performance multiple-recipient usage in a live environment.

Configure java.util.logging as usual and define a SocketHandler connecting to port 11020.

Logger rootLogger=Logger.getLogger("");
try {
    SocketHandler fh = new SocketHandler("127.0.0.1", 11020);
    fh.setEncoding("UTF-8");
    fh.setFormatter(new XMLFormatter());
    rootLogger.addHandler(fh);
} catch(IOException ex) {
    System.out.println("Couldn't connect the SocketHandler. Nope, no reconnect. What a fail.");
    ex.printStackTrace();
}

Building from source

To build Lilith from source, you need to first clone both huxi/sulky and huxi/lilith.

Using Gradle

Both sulky and lilith are built using Gradle.

You have two options:

  1. install Gradle on your system (but please make sure that you are using the correct version, most likely the latest)
  2. Use the gradlew wrapper scripts, either ./gradlew (unix-like systems) or gradlew.bat (Windows)

Using the gradlew wrapper has the advantage that it always uses the correct gradle version but has the disadvantage that it is harder to use in submodules compared to a gradle installation in the path.

If you want to rebuild a submodule using gradlew, you have to change into the respective sub-directory and execute gradlew with the correct amount of ../ prepended to the command.

Whenever I use gradle in the remainder of the document, I refer to either the locally installed gradle in your path or the gradlew wrapper script as explained above.

Building sulky

Change into your local sulky directory and execute gradle.

This builds and tests all sulky modules.

Executing gradle javadocZip/gradle sourceZip creates a zip containing all javadocs/sources in build/distributions.

Building lilith

Building lilith requires that you've built sulky first.

Then change into your local lilith directory and execute gradle.

This creates all Lilith artifacts in lilith/build/distributions and lilith/build/libs.

Executing gradle javadocZip/gradle sourceZip creates a zip containing all javadocs/sources in build/distributions.

Help me!

I'm looking for help concerning the development of IDE plugins.

I've already developed a plugin for IntelliJ IDEA (my IDE of choice) myself. It is contained in the lilith-idea-plugin folder. This plugin opens a ServerSocket on port 11111 and expects serialized StackTraceElement instances. Lilith sends those events whenever the user clicks on either a callstack, an exception or part of an exception stacktrace. The plugin is doing its best to open the source location of the received element in the IDE.

Unfortunately, I have neither time nor know-how about plugin development for either Eclipse or NetBeans. It would be very nice if you could could help me out.

I'd also appreciate any help documenting Lilith.

And I'm always eager to hear your opinion.

Thanks

Thanks to Ceki Gülcü (@ceki) for developing Logback, the Gradle (@Gradleware) community and all persons that have been involved with Lilith development.

I'd also like to thank the developers of Marked (@MarkedApp) for a really helpful, awesome and reasonably priced product.

Similarly, Tower (@gittower) is a really nice git client.

And, of course, thanks to the IntelliJ IDEA (@intellijidea) for the best Java IDE and their support of open source projects.

(This is all free advertisement, I don't get money from any of them.)

Legal mumbo-jumbo

Apache Extras Companion for Apache log4j, Apache log4j, Apache, the Apache feather logo, the Apache Logging Services project logo, the log4j logo, and the Built by Maven logo are trademarks of The Apache Software Foundation. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

All parts of Lilith that can be embedded into an application are LGPL/ASL dual-licensed. Lilith itself is GPL-licensed.

All Your Base Are Belong To Us.

lilith's People

Contributors

huxi avatar tha2015 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

lilith's Issues

Run in GUI-less mode

Hi,

First of all: great piece of software here :) I have the following use-case for Lilith and wanted to ask if this is possible:

I have an application which is running on multiple hosts in my network environment. I want to collect all log messages of these application instances on a single machine. This works great with Lilith as it is and I collected experience with it.

Now is my question: is it possible to run Lilith with no GUI? I want to start Lilith as Log-Server on a pure command line based server and download in regular time periods the log files and check the downloaded logs with a different lilith instance.

Kind regards,
Felix

Version 8.0.0 doesn't work with Ubuntu's OpenJDK 1.8.0_66-internal

There seems to be a bug with the versioncheck to start Lilith. I am using the newest version of OpenJDK8 (1.8.0_66-internal) and it is rejected as too old. Maybe the version check isn't correct.

As far as I can see every Ubuntu Wily based Distro currently uses the 1.8.0_66-internal version. It seems to be the most up to date version for Ubuntu 15.10 without adding additional PPAs. Lubuntu reports 1.8.0_66-internal-b17 as runtime environment and Xubuntu as well. Both using official Ubuntu repositories. Didn't test it with Fedora yet. Usually it should be enough to check for the version without the identifier and maybe adding a disclaimer that Beta or RC versions of Java aren't officially supported.

limux@xubuntu-vbox:~/Downloads$ java -version
openjdk version "1.8.0_66-internal"
OpenJDK Runtime Environment (build 1.8.0_66-internal-b17)
OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode)

http://i.imgur.com/HSqrSo7.png

The provided 8.0.1 snapshot didn't fix this behavior.

One window view

I would like to use Lilith as one window only (without lilith application logs), i.e. there shall not start a new view everytime I restart the application. Furthermore shall the column sizes and filters/exclusions be persisted. I need to do this with every new start of my application again. Also I would like to see my server and client logs (different socketAppenders that send to the same port) in the same window... Do I do somethink wrong?

NDC in lilith

Is there a trick for populating the NDC column in Lilith ?

(is there a way other than creating tickets to ask questions in github ?)

Unable to build

When attempting to build lilith from a fresh source checkout, I get the following issue on a FAILED test... Any ideas? Thanks.

:sulky-groovy:classes                                                                                         
:sulky-groovy:jar                                                                                             
:sulky-groovy:javadoc                                                                                         
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true                                                      
                                                         :sulky-groovy:javadocJar                             
:sulky-groovy:sourceJar                                                                                       
:sulky-groovy:signArchives SKIPPED                                                                            
:sulky-groovy:assemble                                                                                        
:sulky-groovy:compileTestJava                                                                                 
:sulky-groovy:compileTestGroovy UP-TO-DATE                                                                    
:sulky-groovy:processTestResources                                                                            
:sulky-groovy:testClasses                                                                                     
:sulky-groovy:test                                                                                            

de.huxhorn.sulky.groovy.GroovyInstanceTest > refresh[0] FAILED                                                
    org.junit.ComparisonFailure at GroovyInstanceTest.java:159                                                
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true                                                      

12 tests completed, 1 failed                                                                                  
:sulky-groovy:test FAILED                                                                                     

FAILURE: Build failed with an exception.                                                                      

* What went wrong:                                                                                            
Execution failed for task ':sulky-groovy:test'.                                                               
> There were failing tests. See the report at: file:///C:/Develop/Lilith/sulky/sulky-groovy/build/reports/test
/index.html                                                                                                   

* Try:                                                                                                        
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED                                                                                                  

Total time: 56.006 secs                                                                                       
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true                                                      


C:\Develop\Lilith\sulky (master)                                                                              

Unable to log with log4j2

First of all, the documentation is incosistent as is stated:

Lilith is listening for Log4j 2™ SocketAppender connections on port 4445.
and the code below a different port

<Socket name="Socket" host="localhost" port="4560" protocol="TCP">

However, with this code:

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
 
public class TestLog {
 
    private static final Logger logger = LogManager.getLogger(TestLog.class);
 
    public static void main(final String... args) {
 
        logger.trace("Entering application.");
        logger.trace("Exiting application.");
    }
}

And this configuration

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="trace">
    <Appenders>
        <Socket name="LilithDev" host="10.1.10.96" port="4560" protocol="TCP">
            <SerializedLayout />
        </Socket>
        <RollingFile name="RollingFile" fileName="/var/log/log4j2.log"
                     filePattern="/var/log/log4j2-%d{MM-dd-yyyy}-%i.log.gz">
            <PatternLayout>
                <Pattern>%d %p %c{1.} %C{1} [%t] %m%n</Pattern>
            </PatternLayout>
            <Policies>
                <TimeBasedTriggeringPolicy />
                <SizeBasedTriggeringPolicy size="150 kB"/>
            </Policies>
            <DefaultRolloverStrategy max="10"/>      
        </RollingFile>
        <Syslog name="Splunk" host="10.1.30.36" port="514" protocol="TCP"/>
    </Appenders>
    <Loggers>
        <Logger name="com.ups" level="trace">
        </Logger>
        <Root level="all">
            <AppenderRef ref="LilithDev"/>
            <AppenderRef ref="Splunk"/>
            <AppenderRef ref="RollingFile"/>
        </Root>
    </Loggers>
</Configuration>

Lilith 8.1 don't see anything... nor I have any lilith log that help me. I can see that the doors are open, but no connection is shown on the lilith window.

NullPointerException logging Error with log4j2 socket appender with version 8.0.1

We think we've found another bug.
This peace of code :

      try  {
                throw new UnsupportedOperationException();
            } catch( Exception ex ) {
                getLogger().error( ex.getMessage(), ex );
            }

would not be registered by Lilith and produce the following error :

java.lang.NullPointerException
at de.huxhorn.lilith.data.logging.protobuf.generated.LoggingProto$Message$Builder.setMessagePattern(LoggingProto.java:6585) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na]
at de.huxhorn.lilith.data.logging.protobuf.LoggingEventProtobufEncoder.convert(LoggingEventProtobufEncoder.java:269) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na]
at de.huxhorn.lilith.data.logging.protobuf.LoggingEventProtobufEncoder.convert(LoggingEventProtobufEncoder.java:499) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na]
at de.huxhorn.lilith.data.logging.protobuf.LoggingEventWrapperProtobufEncoder.convert(LoggingEventWrapperProtobufEncoder.java:117) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na]
at de.huxhorn.lilith.data.logging.protobuf.LoggingEventWrapperProtobufEncoder.encode(LoggingEventWrapperProtobufEncoder.java:70) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na]
at de.huxhorn.lilith.data.logging.protobuf.LoggingEventWrapperProtobufEncoder.encode(LoggingEventWrapperProtobufEncoder.java:48) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na]
at de.huxhorn.sulky.codec.DelegatingCodecBase.encode(DelegatingCodecBase.java:80) ~[de.huxhorn.sulky.codec-8.0.1-20151127.230227-2.jar:na]
at de.huxhorn.sulky.codec.filebuffer.DefaultDataStrategy.internalWriteElement(DefaultDataStrategy.java:143) ~[de.huxhorn.sulky.codec.filebuffer-8.0.1-20151127.230228-2.jar:na]
at de.huxhorn.sulky.codec.filebuffer.DefaultDataStrategy.addAll(DefaultDataStrategy.java:88) ~[de.huxhorn.sulky.codec.filebuffer-8.0.1-20151127.230228-2.jar:na]
at de.huxhorn.sulky.codec.filebuffer.CodecFileBuffer.addAll(CodecFileBuffer.java:476) ~[de.huxhorn.sulky.codec.filebuffer-8.0.1-20151127.230228-2.jar:na]
at de.huxhorn.lilith.eventhandlers.FileDumpEventHandler.handle(FileDumpEventHandler.java:51) [de.huxhorn.lilith-8.0.1-SNAPSHOT.jar:na]
at de.huxhorn.lilith.engine.impl.sourcemanager.EventPoller.run(EventPoller.java:97) [de.huxhorn.lilith.engine-8.0.1-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66]

Make ports configurable

I want to use the same log configuration for different log viewers, but cannot change the ports to listen to. Neither in Logback Beagle nor in Lilith. Why do all make this hardcoded? Of course one can change that in logback.xml and even add two socket appenders (stupid), but what if e.g. other services use the same ports? Never seen applications where ports cannot be changed. Maybe I'm missing something?

logback 1.4.1 support

Hi,
Are there plans to support logback 1.4.1, slf4j 2.0.1, etc? log4j will soon release a log4j-slfj2-impl lib too.

how to connect to remote host?

Maybe I'm being an idiot, but I can't see how to connect lilith to a remote host. I see "Open" and "Import" under the File menu.

I'm running 0.9.42.1.

Thanks!

Profil view

Hi huxi,

New idea to consider:

--> Ability to manage User Profiles predefined view

For example all views display only show messages with Level> = XXX or for specific views (using source name as criteria?)

Would have the choice of profile via a drop down menu in the menu bar.

Feature Request... Log file viewing.

Hi,

I need to view log4j output files and this tool looks good for network access but not for files. Would that be a challenging add?

Also the splash.jpg might be a troublesome for people who would use this at work...

Thanks,
Mark

New Release?

Hi,

Any chance publishing a new release?

Thank you.

Lilith uses high performance graphics by default on MAC

By default Lilith requires hight performance graphics on mac and switches graphics card to discrete thus draining battery very quickly.

screen shot 2017-02-15 at 19 05 03

solution:
Add NSSupportsAutomaticGraphicsSwitching= 'YES

'
to Info.plst

	<key>NSSupportsAutomaticGraphicsSwitching</key>
	<true/>

screen shot 2017-02-15 at 19 03 32

Lilith is greedy !

Today, Lilith keep large volumes of customer data that are related to the events received post:
/.lilith/logs/*. lilith

This can quickly represent several gigabytes of data on disk.

Should be able to afford to keep this history while compressing the data (zip) on the client.
A purge of compressed sliding window data would be interesting (max 3 last month)

image

Use less offensive splash screen image.

I want to promote lilith in my company, but don't think I can do that until the splash screen contains naked niples. Nice picture for private use, but it prevents from using lilith in professional environments...

Too long development cycle

Not really a code issue, but... it's it about time to release 8.1.0? Last release was 18 months ago, and most recent commits are little more than cosmetics...

Split view

Possibility to split the internal view to display eg top table view and bottom view graphic

On the graph is it possible if you click on a point to automatically converge to the same line in table view ?

On the graph again can we display a summary of the number of events in ERROR / VARN...etc or for the current filter applyed on table view

webstart

Can Lilith be started using webstart ?

ClassicLilithEncoder shall implement Encoder<ILoggingEvent>

I'm trying to programmatically configure Logback to use a RollingFileAppender. Also I'd like to use ClassicLilithEncoder as encoder.

Given that an Appender can be added to a Logger with the following method

addAppender(Appender<ILoggingEvent> newAppender)

Therefore the type parameter of my RollingFileAppender must be ILoggingEvent.

Unfortunately ClassicLilithEncoder implements Encoder<LoggingEvent>, so I cannot pass it to the setEncoder(Encoder<ILoggingEvent>) of RollingFileAppender<ILoggingEvent>.

Unable to build lilith

Hi again,

When attempting to build liilith, I get the following build exception.

:lilith-data-eventsource-xml:testClasses
:lilith-data-eventsource-xml:test
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
                                                         :lilith-data-eventsource-xml:check
:lilith-data-eventsource-xml:build
:lilith-data-logging:javadocJar
:lilith-data-logging:sourceJar
:lilith-data-logging:signArchives SKIPPED
:lilith-data-logging:assemble
:lilith-data-logging:compileTestJava UP-TO-DATE
:lilith-data-logging:compileTestGroovy
:lilith-data-logging:processTestResources
:lilith-data-logging:testClasses
:lilith-data-logging:test

de.huxhorn.lilith.data.logging.ThrowableInfoSpec > validate toString[2] FAILED
    org.spockframework.runtime.SpockComparisonFailure at ThrowableInfoSpec.groovy:313
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

151 tests completed, 1 failed
:lilith-data-logging:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lilith-data-logging:test'.
> There were failing tests. See the report at: file:///C:/Develop/Lilith/lilith/lilith-data/logging/build/reports/tests/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 24.452 secs
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

C:\Develop\Lilith\lilith (master)

If I look in the report index.html file, I get:

Condition not satisfied:

str == expectedValue
|   |  |
|   |  java.lang.RuntimeException: Hi.
|   |   at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:49)
|   |   at de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:86)
|   |  Caused by: java.lang.RuntimeException: Hi Cause.
|   |   at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)
|   |   at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:45)
|   |   ... 1 more
|   |   Suppressed: java.lang.RuntimeException
|   |       at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)
|   |       ... 2 more
|   |   Suppressed: java.lang.RuntimeException: Single line
|   |       at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:62)
|   |       ... 2 more
|   |   Suppressed: java.lang.RuntimeException: With cause and suppressed
|   |       at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:63)
|   |       ... 2 more
|   |       Suppressed: java.lang.RuntimeException: Inner Suppressed
|   |           at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:64)
|   |           ... 2 more
|   |       Suppressed: java.lang.RuntimeException: Inner Suppressed with Cause
|   |           at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:65)
|   |           ... 2 more
|   |       Caused by: java.lang.RuntimeException: Inner Cause
|   |           ... 3 more
|   |   Caused by: java.lang.RuntimeException: Cause
|   |       ... 3 more
|   |   Suppressed: java.lang.RuntimeException: Multi
|   |  line
|   |       at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:67)
|   |       ... 2 more
|   false
|   1 difference (99% similarity)
|   java.lang.RuntimeException: Hi.\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:49)\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:86)\r\nCaused by: java.lang.RuntimeException: Hi Cause.\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:45)\r\n\t... 1 more\r\n\tSuppressed: java.lang.RuntimeException\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)\r\n\t\t... 2 more\r\n\tSuppressed: java.lang.RuntimeException: Single line\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:62)\r\n\t\t... 2 more\r\n\tSuppressed: java.lang.RuntimeException: With cause and suppressed\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:63)\r\n\t\t... 2 more\r\n\t\tSuppressed: java.lang.RuntimeException: Inner Suppressed\r\n\t\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:64)\r\n\t\t\t... 2 more\r\n\t\tSuppressed: java.lang.RuntimeException: Inner Suppressed with Cause\r\n\t\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:65)\r\n\t\t\t... 2 more\r\n\t\tCaused by: java.lang.RuntimeException: Inner Cause\r\n\t\t\t... 3 more\r\n\tCaused by: java.lang.RuntimeException: Cause\r\n\t\t... 3 more\r\n\tSuppressed: java.lang.RuntimeException: Multi(-~)\nline\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:67)\r\n\t\t... 2 more\r\n
|   java.lang.RuntimeException: Hi.\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:49)\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:86)\r\nCaused by: java.lang.RuntimeException: Hi Cause.\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)\r\n\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:45)\r\n\t... 1 more\r\n\tSuppressed: java.lang.RuntimeException\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)\r\n\t\t... 2 more\r\n\tSuppressed: java.lang.RuntimeException: Single line\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:62)\r\n\t\t... 2 more\r\n\tSuppressed: java.lang.RuntimeException: With cause and suppressed\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:63)\r\n\t\t... 2 more\r\n\t\tSuppressed: java.lang.RuntimeException: Inner Suppressed\r\n\t\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:64)\r\n\t\t\t... 2 more\r\n\t\tSuppressed: java.lang.RuntimeException: Inner Suppressed with Cause\r\n\t\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:65)\r\n\t\t\t... 2 more\r\n\t\tCaused by: java.lang.RuntimeException: Inner Cause\r\n\t\t\t... 3 more\r\n\tCaused by: java.lang.RuntimeException: Cause\r\n\t\t... 3 more\r\n\tSuppressed: java.lang.RuntimeException: Multi(\r)\nline\r\n\t\tat de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:67)\r\n\t\t... 2 more\r\n
java.lang.RuntimeException: Hi.
    at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:49)
    at de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:86)
Caused by: java.lang.RuntimeException: Hi Cause.
    at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)
    at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:45)
    ... 1 more
    Suppressed: java.lang.RuntimeException
        at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)
        ... 2 more
    Suppressed: java.lang.RuntimeException: Single line
        at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:62)
        ... 2 more
    Suppressed: java.lang.RuntimeException: With cause and suppressed
        at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:63)
        ... 2 more
        Suppressed: java.lang.RuntimeException: Inner Suppressed
            at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:64)
            ... 2 more
        Suppressed: java.lang.RuntimeException: Inner Suppressed with Cause
            at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:65)
            ... 2 more
        Caused by: java.lang.RuntimeException: Inner Cause
            ... 3 more
    Caused by: java.lang.RuntimeException: Cause
        ... 3 more
    Suppressed: java.lang.RuntimeException: Multi
line
        at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:67)
        ... 2 more

    at de.huxhorn.lilith.data.logging.ThrowableInfoSpec.validate toString(ThrowableInfoSpec.groovy:313)

ServerSocketAppender and Lilith

Hi, so I'm evaluating Lilith and integrating it as a test in a server application. While doing that, I'm trying to figure out: Is the limitation to not connect to a remote host, e.g. with a ServerSocketAppender, intentional, or a architectural limitation?

The server in question won't always be connected to the local log viewer, so I don't see why it should basically poll for a connection every other moment. For the moment I'm probably going to write logs to files and transfer those around, but connecting to get a current view would obviously be easier.

Log4j2 2.1 socket appender fails to connect

Lilith-0.9.45-SNAPSHOT fails to render log4j2 events.
Although socket server is listening, nothing renders.
➜ ~ sudo lsof -i :4445
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 52364 taorg 64u IPv6 0x37e3f8ceb2bfd67 0t0 TCP *:upnotifyp (LISTEN)
java 52364 taorg 92u IPv6 0x37e3f8ce961f867 0t0 TCP localhost:upnotifyp->localhost:49283 (CLOSE_WAIT)
java 52364 taorg 98u IPv6 0x37e3f8ceb2bd067 0t0 TCP localhost:upnotifyp->localhost:49313 (CLOSE_WAIT)

Default filters

When I re-run the same application or source, I expect Lilith to remember the filters I had open from the previous run. Right I have to re-enter the filter every time.

If there is a UI option for this, it isn't obvious.

SocketAppender stopped working

I've attached a SocketAppender on my application. If I run a snapshot of Lilith 8.1 from July it runs correctly.

If I run 8.1 "official" I see:

17:08:09,430 |-INFO in ch.qos.logback.classic.net.SocketAppender[SOCKET] - Dropping event due to timeout limit of [100 milliseconds] being exceeded
(as if Lilith isn't running...)

I've checked the configuration, but found nothing strange.

Make the settings selector more discoverable for new users

Suggestion:
Make the page selector in the preferences window more eye-catching, for example by using color to highlight it.

Another alternative might be to implement a vertical selector like IntelliJ IDEA has in its settings window.

Motivation:
When I was looking for some configuration setting like the font size, I was able to open the preferences window, but I couldn't find the settings I was looking for.

It was only after reading this issue #11 that I discovered that one is able to switch to other settings "pages" by selecting them at the top. I had opened the settings window multiple times, but I had overlooked the combox every single time.

If you don't look at the dropdown arrow at the very right of the window, you can easily mistake the combobox for a label, thus not recognizing that it's interactive.

Especially because the settings window appears very small with respect to the available settings (when you don't know that it has got multiple pages!), user are inclined to give up looking after the wanted setting.

lilith-settings-screenshot

Otherwise, thank you very much for sharing this great tool with us!

lilith 8.0.0 does not allow to connect log4j2 socket appender

It seems new security feature introduced with lilith 8.0.0 blocks socket appender connections from Log4j2 socket appender.

The "Unauthorized deserialization attempt! {}" message is produced.
These two classes are missed:
whitelist.add("java.util.Collections$EmptyMap");
whitelist.add("org.apache.logging.log4j.ThreadContext$EmptyThreadContextStack");

Windows - Lilith 8.1.1 failed to execute from Gradle scripts

test.zip
Please see the attached file for more information.

On Windows, when launching lilith.bat from Gradle script, both JAVA_HOME and JAVA_EXE are set, as a result, lilith.bat could not execute correctly and displayed below error

C:\test > gradle lilith
> Task :lilith FAILED

WARN: JAVA_HOME is set to an invalid directory.
JAVA_HOME = C:\programs\jdk1.8.0_51
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lilith'.
> Process 'command 'cmd'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
1 actionable task: 1 executed

Font size in Table View

Can we have a preferences settings for display text size in Table view ?
Type of font (Arial,Tahoma,verdana,..etc) would be appreciate as a new settings too

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.