Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ihtfw/Logazmic
Windows log viewer for log4j
https://github.com/ihtfw/Logazmic
Last synced: 5 days ago
JSON representation
Windows log viewer for log4j
- Host: GitHub
- URL: https://github.com/ihtfw/Logazmic
- Owner: ihtfw
- License: mit
- Created: 2014-07-02T03:18:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T09:37:20.000Z (14 days ago)
- Last Synced: 2024-10-28T10:26:10.027Z (14 days ago)
- Language: C#
- Size: 20.8 MB
- Stars: 59
- Watchers: 6
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
Logazmic
========
Minimalistic log viewer for nlog. Supports only log4j xml layout yet. Core is based on [Log2console](https://log2console.codeplex.com/). UI is rewritten in WPF with usage of [MahApps.Metro](https://github.com/MahApps/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](https://raw.githubusercontent.com/ihtfw/Logazmic/master/docs/screenshot1.png) ![Alt Logazmic screenshot 1](https://raw.githubusercontent.com/ihtfw/Logazmic/master/docs/screenshot2.png)
## Setup
### NLog (http://nlog-project.org/):
### Xml configuration
```xml
```
### Code configuration
```csharp
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);
#endregionLogManager.Configuration = config;
```### Logazmic.Integration
Install nuget package Logazmic.Integration. In your code to install, run and open log file
```csharp
var runner = new Logazmic.Integration.Runner();
runner.Run(pathToLogFile);
```