Need a better Live Log Viewer for NLog, Log4Net and Enterprise Library - viewer

I need a better Live Log Viewer that supports NLog, Log4net and Enterprise Library. The Viewer must constantly be running in live mode for our operation guys. So far the ones that we've tried always run out of memory and we always need to restart them. I need a Viewer that can either remove unwanted stale messages or roll them over to a log file automatically. I know this is a tall order. So far no luck. We will even pay for it.

I use the ReflectInsight Viewer. http://www.reflectsoftware.com/
We use Enterprise Library and Log4net logging at work which produce text log files. Previously I would use a number of tail logging programs to show me new messages that came into the files, but didn't provide much filtering, searching capabilities.
By adding a reference to the ReflectInsight Logging Extensions https://insightextensions.codeplex.com and updating my existing logging configuration, I was able to send my logged messages to the ReflectInsight viewer and view them in real-time. I was then able to search, filter, bookmark, and view my messages.
I could then save the results to another file...containing only what I needed and filtering out the noise from other applications.
I hope this helps you as it did me.

Have you tried LogGrok for viewing NLOG logs?
It supports filter the log by any field for MSI, VB and NLOG, configurable highlighteres(some are already pre-configured), multiple search results (supporting Regex).
Utility supports large log files and has customizable docking windows UI.
LogGrok is opensource, you can add features you need by yourself(or ask project team to add it for you).
Project documentation can be found in this repository

I use LogExpert http://logexpert.codeplex.com/ it is free, and it has some very powerful features. I have only ran into one or two minor bugs. Features include, Filtering, Search, Color coded phrases, regular expressions, filter to tab (creating new log files from distilled results).
All in all really well done, and the developer needs help to keep it going!

Related

Where can I find a hook to customize the search via Shopware App?

I am prototyping a Shopware App right now, where I want to extend the search with our search API. We already have a working plugin in the store for that.
I found those two references for hooks:
https://developer.shopware.com/docs/resources/references/app-reference/webhook-events-reference
https://developer.shopware.com/docs/resources/references/app-reference/script-reference/script-hooks-reference
Seems like there is no webhook for the search at all and just a script-hook for a finished search. In the plugin, we could just extend the ProductSearchRoute and be completely flexible.
Are search extension not planned right now?
Cheers,
Tobias
I assume you want to alter the criteria for fetching the products. As of today this is not yet possible with non-self-hosted apps. You could use the app scripts to enrich or replace the contents of an already loaded page as you already mentioned. Obviously that comes with some drawbacks regarding performance. The capabilities of apps are being enhanced continuously though so there's chance search manipulation might become possible rather soon.

How to get information about UWP app?

How can I get information about an UWP application on Windows 10 from another application?
As a minimum, I am interested in application name and default tile. Then, I would like to be able to learn as much as possible, of course.
Some UWP apps can be linked to an EXE. That is, their main window is created by an EXE. This helps. At least, I know the location of "resource.pri", which presumably can be read.
But, there are apps which do not have EXE, and "hosted" by wwahost.exe instead. These are black boxes to me. Is there any way to know what is inside?
I would appreciate any hints.
Thanks
It's possible, but very different than what we do for desktop apps. I can share you the possible solution but there are some security issues, so I suggest you contact Microsoft to get a better way(maybe open some APIs for this kind of information) ensure your users have a safe system.
Here is what we need to do to get these information.
Enum WWAHost process.
You can enum "File type" items loaded into WWAHost, and find the one which is in this format: "C:\Program Files\WindowsApps\xxxx". When you view the app in Task Manager and view its properties, you will find it is a folder property windows. And you can also use Process Explorer to check the WWAHost process, and you will find the folder format I mentioned.
(Security Issue) To get the package name, version and more information, you have to access the folder I mentioned above. By reading the AppxManifest and dumping the resource.pri by using "makepri dump" and reading the generated resource.pri.xml, you will be able to get many information. But, we have to use special way to get access to the windowsapps folder and it will raise security risk to your users' OS(and maybe other issues). But if it is for your personal use, it's OK.

Is there any local history in Visual Studio 2012

That is a really useful feature, there are many IDEs that can provide it but I can't find any extension which can provide Local History.
By Local History I mean something that tracks any changes and edits that I make on the source code so I can be able to recover it in future.
There is a separate extension that provides local history functionality:
http://visualstudiogallery.msdn.microsoft.com/226c2108-9da9-407d-b90d-9783040d27b8
I think the local history feature complements version control.
What you are describing is a source code control system. Visual Studio does not provide this by default as its primary job is that of an editor. It does support a number of source code control plugins, many for free, which will do this for you.
For example there is a free Git plugin that is now officially provided by Microsoft.
http://visualstudiogallery.msdn.microsoft.com/abafc7d6-dcaa-40f4-8a5e-d6724bdb980c
This can be used with a number of free Git providers
CodePlex
GitHub
Visual Studio Hosting
There is an option to have best of both worlds:
autogit - Visual Studio extension
Here are some counter reasons why local history is different then source code repository:
Some simple reasons:
simple insurance against accidental changes or deletions.
makes it easier to support smarter undo, backtracking, or exploratory programming.
resume a task or track a task by seeing changes at a fine-grain level as they happened.
light-weight, stays invisible until you need it.
Some deeper reasons:
Better Task Resumption: research suggests that resuming an interrupted task or reviewing a change made by another is made easier when changes can be reviewed in an time-ordered manner (in comparision to a flat commit).
Auto-blog: automark is a sister project that can examine a git repository and then automatically generate a markdown file, in a format suitable for publishing a blog post.
Personal Analytics: Watts Humphrey has advocated the idea of tracking personal activity for self-improvement, using methods such as the Personal Software Process. Using services, such as codealike or codeivate, you can track things like time spent editing, etc. Tracking the actual changes can take this analysis to another level.
Api Analytics: Frequent mistakes are made when programming or using particular apis. This can be analyzed: "You spent 3 hours figuring out how to correctly use pygit2.create_commit(), create github issue?"
There's also the Auto History Extension: https://visualstudiogallery.msdn.microsoft.com/dfcb2438-180c-4f8a-983b-62d89e141fe3
It's like the one Juha Palomäki linked to, except has more downloads, reviews, and a slightly higher average-review. (haven't tried either myself yet, though plan to in a day or two)

How to Analyse Failed Request Tracing log for IIS7

there is a error in my IIS7 on one website so i activate the Failed Request Tracing log and get some XML files, how to analyze this XML stuff? Any tools outside?
I found FRT Logs Article but is there any comfortable LogSuite available to analyze all FRT Logs in a directory?
I know this is old but in case anyone comes across this like I did, IE loads it up with all the pretty formatting, tabs, and collapsible sections as shown in https://www.pluralsight.com/blog/it-ops/iis-7-troubleshooting
Which doesn't exactly answer, as it I wouldn't call it a tool but it appears to be the intended way to view it, while not readily apparent [at least in my opinion given that many of the logs output by Microsoft nowadays have viewers to parse the data]

log4net vs. Nlog

Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
Anyone have experience for both? How do they stack up against each other?
We are planning on using one of them for logging in an enterprise application.
References:
log4net
nlog
EDIT: We have no existing dependencies to either nlog or log4net.
I was recently tasked to "prototype up some loggin'" for an upcoming project. I didn't have any logging framework experience. I researched, ran through tutorials, made toy apps, etc. on Log4Net, NLog, and Enterprise Library for a few days. Came back 3-4 weeks later and put them together into a cohesive demo. Hopefully some of this is useful to you.
My recommendation for our project is this:
Use a logging facade (e.g. Common.Logging, SimpleLoggingFacade) to avoid direct dependencies.
If we end up using Enterprise Library for other facilities, then use it for Logging, too.
If we end up using something with a dependency on Log4Net, use Log4Net.
If none of the above, use NLog. Which I'd prefer.
That's based on these findings (opinions!):
All 3 frameworks are capable and can do some sophisticated things. We want a quality solution, but frankly don't need ultra high performance or 60 types of event sinks.
All 3 have very similar basic concepts.
Each has its own cool tricks, like really advanced routing, or dynamic log filenames, file truncating, etc.
All 3 are pretty well documented in their own way.
For a complete newb like me, they were all a little awkward initially. No drastic differences here for the basics. I got over it.
When revisiting things a few weeks later, NLog was clearly the easiest to resume. I needed very little brush up on it. With Log4Net, I had to revisit a few online examples to get going. With EntLib, I gave up and did the tutorials all over again from scratch - I was totally lost.
I couldn't figure out how to get EntLib to do some things like log to the database. It might be easy, but it was beyond my time limit.
Log4Net and NLog have a small in-code footprint. EntLib is spammy, but I'd use a facade over it anyway.
I accidentally mis-configured EntLib and it told me at run time. Log4Net didn't. I didn't have an accidental mis-config with NLog.
EntLib comes with a nice looking app.config editor, which you 100% need. NLog has a config file schema so you get "intellisense". Log4Net comes with nada.
So obviously I like NLog so far. Not enough to use it in spite of having another solution available, though.
A key consideration that hasn't been much discussed is support and updates.
Log4Net hasn't been updated since version 1.2.10 was published April 19, 2006.
In contrast, NLog has been actively supported since 2006 will soon release NLog 2.0 supporting many platforms that didn't exist when log4net was last updated such as:
NET Framework 2.0 SP1 and above, 3.5 & 4.0 (Client and Extended profiles)
Silverlight 2.0, 3.0, 4.0
.NET Compact Framework 2.0, 3.5
Mono 2.x profile
Having had an experience with both frameworks recently, I thought I can share my views on each frameworks.
I was asked to evaluate the logging frameworks for an existing web application, I narrowed down my choices to NLog (v2.0) and log4net (v1.2.11) after going through various online forums. Here are my findings:
Setting/starting up with NLog is dead easy. You go through the Getting started tutorial on their website and you are done. You get a fair idea, how thing might be with nlog. Config file is so intuitive that anyone can understand the config. For example: if you want to set the internal logging on, you set the flag in Nlog config file's header node, which is where you would expect it to be. In log4net, you set different flags in web.config's appSettings section.
In log4net, internal logging doesnt output timestamp which is annoying. In Nlog, you get a nice log with timestamps. I found it very useful in my evaluations.
Filters in log4net - You better check my this question - log4net filter - how to write AND filter to ignore log messages and if you find an answer/solution for this, please let me know.
I understand, there is a workaround for this question, as you can write your own custom filter. But something which is not easily available in log4net.
Performance - I logged around 3000 log messages to database using a stored procedure. I used simple for loop (int i=0; i<3000; i++... to log the same message 3000 times. For the writes: log4net AdoAppender took almost double the time than NLog.
Log4net doesnt support asynchronous appender.
It was sufficient comparison for me to choose NLog as the logging framework. :)
For anyone getting to this thread late, you may want to take a look back at the .Net Base Class Library (BCL). Many people missed the changes between .Net 1.1 and .Net 2.0 when the TraceSource class was introduced (circa 2005).
Using the TraceSource is analagous to other logging frameworks, with granular control of logging, configuration in app.config/web.config, and programmatic access - without the overhead of the enterprise application block.
.Net BCL Team Blog: Intro to Tracing - Part I (Look at Part II a,b,c as well)
There are also a number of comparisons floating around: "log4net vs TraceSource"
For us, the key difference is in overall perf...
Have a look at Logger.IsDebugEnabled in NLog versus Log4Net, from our tests, NLog has less overhead and that's what we are after (low-latency stuff).
Cheers,
Florian
First look at the rest of your stack.
If you are using NHibernate, it utilizes Log4Net directly.
Other frameworks might have other specific loggers they need.
Other than that: both work fine.
I've settled on Log4Net myself. It can be a pain to configure, and if it isn't configured correctly it is a pain to figure out what went wrong. But you can make it do almost anything you would want from a logger.
If you don't have a standing issue with Log4Net, here is an article I wrote on how to get started with it:
http://elegantcode.com/2007/12/07/getting-started-with-log4net/
Well .. I used Enterprise library for database logging tasks
and now I switched to NLog due to performance bottleneck.
some comparison info :
http://pauliusraila.blogspot.com/2010/10/solving-database-logging-bottlenecks.html
I echo the above and do prefer nLog. Entlib is needlessly bloated.
Re:Log4net One thing that ALWAYS gets me with log4net is forgetting to add the following to the global.asax to init the component:
log4net.Config.XmlConfigurator.Configure();
If you go here you can find a comprehensive matrix that includes both the NLog and Log4Net libs as well as Enterprise Lib and other products.
Somebody could argue that the matrix is done in a way to underline the features of the only commercial lib present in the matrix. I think it's true but it was useful anyway to drive my choice versus NLog.
Regards
As I noticed, log4net locks their output files the whole time application is running, so you can't delete them. Otherwise they are similar.
So I prefer NLog.
Shameless plug for an open source project I run, but given the lively discussion about which .NET logging framework is more active I thought I'd post an obligatory link to Serilog.
To use within an application, Serilog is similar to (and draws heavily on) log4net. Unlike other .NET logging options, however, Serilog is about preserving the structure of log events for offline analysis. When you write:
Log.Information("The answer is {Answer}", 42);
Most logging libraries immediately render the message into a string. Serilog can do that too, but it preserves the { Answer: 42 } property so that later on, using one of a number of NoSQL data stores, you can properly query events based on the value of Answer.
We're close to a 1.0 and support all of the modern (.NET 4.5, Windows Store and Windows Phone 8) platforms.
I second NLog too because it works with unmanaged code too.
I suppose it could be possibe to use log4net and log4cxx together, but NLog handles both managed and unmanaged code out of the box.
I also looked at Common.Logging, a facade that makes abstraction of the logging api, it supports log4net, NLog and Entreprise Library. I don't think i'll use it, but i like how they use lambdas to improve performance when logging is disabled (a feature shared with NLog and probably others).
You might also consider Microsoft Enterprise Library Logging Block. It comes with nice designer.
I think the general consensus is that nlog is a bit easier to configure and use. Both are quite capable, though.
Based on my experience, SmartInspect beats both NLog and log4net.
Its extremely easy to use, documentation is great, and you can view and filter previously logged messages with their interactive log viewer, which is a huge real world advantage.
One thing I like is the tabbed views of data, like the browser tabs in Chrome. Each tab can provide a different filtered view of the log.

Resources