Giter Site home page Giter Site logo

log4j-sublime's Introduction

Log4j tail plugin for Sublime Text

Tail and level highlighting for log4j output! Be gentle! Python amateur.

Quick Setup:

1: Copy all files to:

  - OSX: /Users/_user_/Library/Application Support/Sublime Text 2/Packages/Log4j/

2: Configure Log4j FileAppender. Example config, 'ConversionPattern' is important.

log4j.appender.ToFile=org.apache.log4j.FileAppender
log4j.appender.ToFile.threshold=DEBUG
log4j.appender.ToFile.Append=false
log4j.appender.ToFile.ImmediateFlush=true
log4j.appender.ToFile.File=log4j.log
log4j.appender.ToFile.layout=org.apache.log4j.PatternLayout
log4j.appender.ToFile.layout.ConversionPattern=[%p][%c{2}]: %m%n

- Expected output:
  [LEVEL][category]: Message
Default key bindings (Default.sublime-keymap):
- Start log4j, specify a filter. Hint: debug
  { "keys": ["super+shift+t"], "command": "log4j" }

- Bring the log4j panel to the front
  { "keys": ["ctrl+super+t"], "command": "show_panel", "args": {"panel": "output.log4j"} },
About the files:

1: Log4j Syntax highlighting:

- (compiled file) Log4j.tmLanguage
- (source file) Log4j.JSON-tmLanguage

2: Log4j Theme override definitions

- Log4j.tmTheme

3: Log4j Sublime Plugin scripts:

- Log4j.py
- tail.py
  ** This plugin requires Kasum's awesome Python tail script.
  ** His original code is here: https://github.com/kasun/python-tail
  It's bundled here as it has some small modifications that were required in order to stop it within a thread. Many thanks!
TODO:
  • Separate configuration for log file. Currently looks for: log4j.log
  • Regexp for filter
  • Optimize append. Has to be a cleaner way to open/configure/append this.
  • Figure out how to bundle this all up
  • Handle file resets gracefully
  • Learn more Python oO

log4j-sublime's People

Contributors

scarrillo avatar

Watchers

 avatar  avatar

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.