Giter VIP home page Giter VIP logo

logazmic's Introduction

Logazmic

Icon

Minimalistic log viewer for nlog. Supports only log4j xml layout yet. Core is based on Log2console. UI is rewritten in WPF with usage of MahApps.Metro

Supports:

  • Listening on tcp/udp
  • Opening *.log4j files
  • Drag-and-drop files

Download

https://github.com/ihtfw/Logazmic/releases/latest/

Screenshots:

Alt Logazmic screenshot 1 Alt Logazmic screenshot 1

Setup

Xml configuration

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <targets>
        <target name="logfile"  layout="${log4jxmlevent}"  xsi:type="File" fileName="file.txt" />
    </targets>

    <rules>
        <logger name="*" minlevel="Info" writeTo="logfile" />
    </rules>
</nlog>

Code configuration

var config = new LoggingConfiguration(); 

#region file
var ftXml = new FileTarget
                        {
                            FileName = XmlLogPath,
                            Layout = " ${log4jxmlevent}",
                            Encoding = Encoding.UTF8,
                            ArchiveEvery = FileArchivePeriod.Day,
                            ArchiveNumbering = ArchiveNumberingMode.Rolling
                        };

var asXml = new AsyncTargetWrapper(ftXml);
var ruleXml = new LoggingRule("*", LogLevel.Trace, asXml);
config.LoggingRules.Add(ruleXml);
#endregion

#region tcp
var tcpNetworkTarget = new NLogViewerTarget
                                   {
                                       Address = "tcp4://127.0.0.1:4505",
                                       Encoding = Encoding.UTF8,
                                       Name = "NLogViewer",
                                       IncludeNLogData = false
                                   };
var tcpNetworkRule = new LoggingRule("*", LogLevel.Trace, tcpNetworkTarget);
config.LoggingRules.Add(tcpNetworkRule);
#endregion

LogManager.Configuration = config;

Logazmic.Integration

Icon

Install nuget package Logazmic.Integration. In your code to install, run and open log file

 var runner = new Logazmic.Integration.Runner();
 runner.Run(pathToLogFile);

logazmic's People

Contributors

ihtfw avatar susloparovdenis avatar mikel785 avatar

Watchers

James Cloos 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.