Giter VIP home page Giter VIP logo

azure-sdk-log-parser's Introduction

Java AMQP SDK log parser tool

Small tool to parse Azure messaging SDK (for Java) log files and send them to Azure Log Analytics for analysis.

Prerequisites

  • Maven
  • JDK 11
  • Application Insights resource

Usage

  • mvn package
  • Depending on what format your log lines are in, you'll use either the "plain" or "json" command.
    • If your log lines are plaintext: java ./target/log-parser.jar plain [command options] -f path-to-log.log
    • If your log lines are JSON objects: java ./target/log-parser.jar json [command options] -f path-to-json-log.log

See HELP for full documentation, default values, and available options:

  • java ./target/log-parser.jar --help

Plaintext Log Examples

If your log is a series of plaintext lines.

Custom log layout: java -jar log-parser.jar plain -f c:\downloads\logs.zip -l "<date> <time> <level> [<thread>] <class> - " -c InstrumentationKey=secret;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/

Print parsed logs:

java -jar -Dorg.slf4j.simpleLogger.defaultLogLevel=debug log-parser.jar plain -f c:\downloads\logs.log -c InstrumentationKey=secret;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/ -m 10 when specifying layout, add separator at the end. date, time and level are magic words. See --help to see full list of supported keywords.

Dry run, no data is sent: java -jar log-parser.jar plain -f c:\downloads\logs -d

Json Log examples

See java ./target/log-parser.jar --help for all examples.

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.