Giter Site home page Giter Site logo

ghhv / sejil Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alaatm/sejil

0.0 1.0 0.0 1.39 MB

Capture, view and filter your ASP.net core log events right from your app

License: Apache License 2.0

HTML 0.43% C# 66.31% PowerShell 3.10% CSS 4.35% JavaScript 0.53% TypeScript 23.20% Shell 1.49% TSQL 0.60%

sejil's Introduction

NOTE The master branch, including this readme, has switched to .netcore 3.0. For .netcore 1/2 based, please go here: release/1.0.1.

Sejil

Build status NuGet

Sejil is a library that enables you to capture, view and filter your ASP.net core app's log events right from your app. It supports structured logging, querying as well as saving log event queries.

Quick Links

Getting started

  1. Installing Sejil package

    dotnet add package Sejil --version 2.0.0-beta1
  2. Adding code Add below code to Program.cs:

    public static IWebHost BuildWebHost(string[] args) =>
        Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder =>
            {
                webBuilder.AddSejil("/sejil", LogLevel.Debug);
                // ...
            });            

    Add below code to Startup.cs

    using Sejil;
    
    public class Startup
    {    
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            app.UseSejil();
            // ...
        }
    }

    (Optional) To require authentication for viewing logs:

        public void ConfigureServices(IServiceCollection services)
        {
            services.ConfigureSejil(options =>
            {
                options.AuthenticationScheme = /* Your authentication scheme */
            });
        }

    (Optional) To change the logs page title (Defaults to Sejil if not set):

        public void ConfigureServices(IServiceCollection services)
        {
            services.ConfigureSejil(options =>
            {
                options.Title = "My title";
            });
        }
  3. Navigate to http://your-app-url/sejil to view your app's logs.

Features and Screenshots

  • View your app's logs

  • View properties specific to a certain log entry

  • Query your logs

  • Mix multiple filters with your query to further limit the results

  • Save your queries for later use

  • Load your saved queries

Building

To build the project, you just need to clone the repo then run the build command:

git clone https://github.com/alaatm/Sejil.git
cd ./Sejil
./build.ps1  # If running Windows
./build.sh   # If running Linux/OSX

You can run one of the sample apps afterwards:

cd ./sample/SampleBasic
dotnet run

License

License

Copyright © Alaa Masoud.

This project is provided as-is under the Apache 2.0 license. For more information see the LICENSE file.

sejil's People

Contributors

alaatm avatar twenzel avatar

Watchers

 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.