All Projects → soleaf → ErRabbit

soleaf / ErRabbit

Licence: other
Remote logging console server using Log4j. Visual exception stackTrace log view.

Programming Languages

java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to ErRabbit

msLog
log for webView & webApp 用于webView和webApp的log工具
Stars: ✭ 25 (-47.92%)
Mutual labels:  log
horse-logger
Middleware for access logging in HORSE
Stars: ✭ 25 (-47.92%)
Mutual labels:  log
composition-logger
The most optimal way to visualize/debug functional compositions 🔍
Stars: ✭ 15 (-68.75%)
Mutual labels:  log
discord-audit-log-bot
A Discord bot that extends Discord's native Audit Log.
Stars: ✭ 109 (+127.08%)
Mutual labels:  log
ip-logger
📇 When someone clicks the link, you will receive their IP and other information via telegram.
Stars: ✭ 0 (-100%)
Mutual labels:  log
state inspector
State change & method call logger. A debugging tool for instance variables and method calls.
Stars: ✭ 24 (-50%)
Mutual labels:  log
dlog
A super simple logger for Go. Supports stderr, logfiles, syslog and windows event log.
Stars: ✭ 16 (-66.67%)
Mutual labels:  log
Log4j-RCE-Scanner
Remote command execution vulnerability scanner for Log4j.
Stars: ✭ 200 (+316.67%)
Mutual labels:  log4j
printer
A fancy logger yet lightweight, and configurable. 🖨
Stars: ✭ 65 (+35.42%)
Mutual labels:  log
log4shelldetect
Rapidly scan filesystems for Java programs potentially vulnerable to Log4Shell (CVE-2021-44228) or "that Log4j JNDI exploit" by inspecting the class paths inside files
Stars: ✭ 40 (-16.67%)
Mutual labels:  log4j
WatsonSyslogServer
C# Syslog Server
Stars: ✭ 18 (-62.5%)
Mutual labels:  log
yii2-logreader
Yii2 Log Reader
Stars: ✭ 31 (-35.42%)
Mutual labels:  log
log4jscanwin
Log4j Vulnerability Scanner for Windows
Stars: ✭ 142 (+195.83%)
Mutual labels:  log4j
polog
Логирование должно быть красивым
Stars: ✭ 26 (-45.83%)
Mutual labels:  log
awesome-list-of-secrets-in-environment-variables
🦄🔒 Awesome list of secrets in environment variables 🖥️
Stars: ✭ 538 (+1020.83%)
Mutual labels:  log4j
log4shell-finder
Fastest filesystem scanner for log4shell (CVE-2021-44228, CVE-2021-45046) and other vulnerable (CVE-2017-5645, CVE-2019-17571, CVE-2022-23305, CVE-2022-23307 ... ) instances of log4j library. Excellent performance and low memory footprint.
Stars: ✭ 22 (-54.17%)
Mutual labels:  log4j
dtail
DTail is a distributed DevOps tool for tailing, grepping, catting logs and other text files on many remote machines at once.
Stars: ✭ 112 (+133.33%)
Mutual labels:  log
Postfix-Deliverability-Analytics
[DEPRECATED] A tool that goes throu Posftix logs and builds a statistics of bounces (non-delivered messages). Statistics are provided by REST API to the client.
Stars: ✭ 21 (-56.25%)
Mutual labels:  log
doom-console-log
🕹️ DOOM rendered via console.log() in a web browser.
Stars: ✭ 19 (-60.42%)
Mutual labels:  log
analog-ce
Analog CE
Stars: ✭ 14 (-70.83%)
Mutual labels:  log

Build Status

ErRabbit

Introduction

ErRabbit(Error Rabbit) is useful error remote tracking service with Visual View. Collecting by Log4j, slf4j(by Plinio Freire) and ActiveMQ will make it easy compatible with other programs.

Introduction Slide http://www.slideshare.net/ilhoahn50/errabbit

What's a difference.

  • RrRabbit aim to visualize Error logs
  • Easy to integrate on exisiting java application.

한국어 설명은 이곳에 있습니다.

Structure

Structure

Web console screenshot

Main

ScreenShot (+ Click to zoom)

  • Managing rabbits(your applications)
  • Grouping
  • Clean logs
  • View logs

Log view

ScreenShot (+ Click to zoom)

  • Explorer logs selected day
  • Log level chart by time
  • Filtering logs by level or class name

Graphic Exception trace View (Log detail view)

ScreenShot (+ Click to zoom)

  • View Exception trace with graphical flow chart
  • Show or hide library packages
  • View original text log
  • Search library package info with google search

Console

ScreenShot (+ Click to zoom)

  • Live feed all logs with WebSocket
  • Same log view functions like log view page

Analysis(Aggregation query)

ScreenShot (+ Click to zoom)

  • Easy ggregating logs counts with custom grouping and filtering

Batch Reprot

ScreenShot(+ Click to zoom)

  • Daily report batch
  • View all yesterday event logs on one page.

Requirements

  • Java 1.7 upper
  • MongoDB 2
  • ActiveMQ
  • Configure Log4j or slf4j

Install and Using

  1. Run MongoDB, ActiveMQ
  2. Run ErRabbit
  3. Make a Rabbit
  4. Add JMS Appender to your application log4j2.xml

Download release

https://github.com/soleaf/ErRabbit/releases

Run Dependencies

ErRabbit uses MongoDB and ActiveMQ.

  1. Run MongoDB
  2. ActiveMQ server

Run ErRabbit

Setup settings.properties

  • Edit settings.properties
  • For MongoDB and ActiveMQ.. etc Set with your sever settings.

Run

Run with command sh run.sh
Or directly command java -jar [war filename] --spring.config.location=file:settings.properties

Login Console and add new Rabbit.

  1. Connect Console with WebBrowser http://localhost:[port]
  2. Your server port is 'server.port' on 'settings.properties' and login account is also on properties ('errabbit.security.admin.username, errabbit.security.admin.password').
  3. Click 'add' menu on left side.
  4. Make your new rabbit. (Rabbit is a namespace for tracking log like application artifact id).

Make your application connect JMS

Choose method by your application log4j version.

  • Log4j 1.2
  • Log4j 2.x

If you want to use slf4j refer this section

Setup for Log4j 1.2

Because Default JMS Appender on Log4j1 did not support queue, ErRabbit made a custom appender. There is dependency for our custom appender.

Add Dependencies to maven pom.xml

<dependency>
    <groupId>org.mintcode.errabbit</groupId>
    <artifactId>log4j-apeender</artifactId>
    <version>1.0.0</version>
</dependency>

Setup log4j.xml

  1. Declare 'errabbit' appender to log4j.xml with your ActiveMQ URL, userName, password, rabbitID
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    <!-- Console view -->
    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %p - %C{1}.%M(%L) | %m%n"/>
        </layout>
    </appender>

    <appender name="errabbit" class="org.mintcode.errabbit.log4j.Log4jAppender">
        <param name="host" value="tcp://localhost:61616"/>
        <param name="rabbitID" value="example"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%5p [%d{HH:mm:ss}] %m%n"/>
        </layout>
    </appender>

    <logger name="org.mintcode.errabbit.example">
        <level value="ERROR"/>
        <appender-ref ref="errabbit"/>
    </logger>

    <!-- Root Logger -->
    <root>
        <priority value="INFO" />
        <appender-ref ref="console" />
    </root>

</log4j:configuration>

CustomAppender's source : https://github.com/soleaf/ErRabbit-log4j-apeender

Use In Application Code

You can collect all kind of log(info, debug, trace .. etc). But, for your application performance, use only as exception error logging.

  1. Get Log4j Logger
Logger logger = Logger.getLogger(getClass());
  1. Log error with exception, Just type logger.error([message],e). Another log level is same as your before code(like logger.info("hello");).
try{
    int a[] = new int[2];
    System.out.println("Access element three :" + a[3]);
}
catch (Exception e){
    logger.error(e.getMessage(),e);
}

Example Project : https://github.com/soleaf/ErRabbit-Example-log4j1

Setup for Log4j 2.x

Add Dependencies to maven pom.xml

<dependency>
    <groupId>javax.jms</groupId>
    <artifactId>jms</artifactId>
    <version>1.1</version>
</dependency>
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-core</artifactId>
    <version>5.7.0</version>
</dependency>

and add repository for javax.jms (if maven can't find javax.jms)

 <repositories>
        <repository>
            <id>repository.jboss.org-public</id>
            <name>JBoss.org Maven repository</name>
            <url>https://repository.jboss.org/nexus/content/groups/public</url>
        </repository>
    </repositories>

Setup Log4j2

  1. Declare 'JMS Appender' to log4j2.xml with your ActiveMQ URL, userName, password.
  2. 'queueBindingName' should be 'errabbit'.
  3. And add JMS Appender to Loggers.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info" name="MyApp" packages="org.mintcode.errabbit.example">
<Appenders>
    <JMS name="errabbit"
         queueBindingName="errabbit.report.example"
         factoryBindingName="ConnectionFactory"
         providerURL = "tcp://localhost:61616"
         userName = "sender"
         password = "senderpassword!"
            />
    <Console name="STDOUT" target="SYSTEM_OUT">
        <PatternLayout pattern="%m%n"/>
    </Console>
</Appenders>
<Loggers>
    <Logger name="org.mintcode.errabbit.example" level="error">
        <AppenderRef ref="errabbit"/>
    </Logger>
    <Root level="error">
        <AppenderRef ref="STDOUT"/>
    </Root>
</Loggers>
</Configuration>

Setup jndi.properties

  1. Make java/main/resource/jndi.properties, and put same ActiveMQ settings(username, password, rabbitID).
  2. queue.errabbit's value should be 'errabbit.report.[RabbitID]'.
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url = tcp://localhost:61616
queue.errabbit = errabbit.report.example

Use In Application Code

ErRabbit uses Log4j2 JMS Appender, and collects exceptions with other information logs. You can collect all kind of log(info, debug, trace .. etc). But, for your application performance, use only as exception error logging.

  1. Get Log4j Logger
Logger logger = LogManager.getLogger(getClass());
  1. Log error with exception, Just type logger.error([message],e)
try{
    int a[] = new int[2];
    System.out.println("Access element three :" + a[3]);
}
catch (Exception e){
    logger.error(e.getMessage(),e);
}

Example Project : https://github.com/soleaf/ErRabbit-Example-log4j2

Read System output

If you have legacy logs which use JVM System.class (printstackstrace, System.out, System.err and etc), you can configure your application to wrap them to Log4j. Check more info on this wiki article.

Slf4j logging component support

There is other implementations by Plinio Freire(https://github.com/plinioasf)

Contribute

We welcome anyone want to improve ErRabbit.

  • You can just fix and send pull request to me.
  • Or talk about new feature through email([email protected]).
  • Please comment as English at commit.

Plan and Troubleshooting

Please read this wiki

https://github.com/soleaf/ErRabbit/wiki

Special thanks

Awards

  • Golden prize at 2015 OSS world challenge

Talk with me

License

Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].