LoggingThe Ultimate Guide

your open-source resource for understanding, analyzing, and troubleshooting system logs

curated byloggly

.NET

.NET Logging Basics

What Is Logging? Logging is essential for a software development project, but it’s often disregarded until the program crashes. Logging serves numerous purposes including root cause analysis, bug analysis, and even performance reviews for the application. With .NET, the programmer can log to several locations and not just a flat file. Both the C# and VB.Net languages offer internal libraries to help you get started. They are limited, but you...

.NET

.NET Logging Libraries

Microsoft provides you with an excellent source for logging errors into the Event Viewer, but it’s sometimes too difficult to analyze issues when using the default library source. Let’s say you have 10 web servers hosting a web application. If you write errors to each server’s Event Viewer, it can be extremely time-consuming to find out which server is having issues. In many cases, one server could have a hardware...

.NET

.NET Searching Logs

We’ve looked at the different libraries you can use to log .NET events. The way you search logs completely depends on how you log events from your code. You can store logs in plain text, XML format, or directly to the Event Viewer. You can search Event Viewer and XML logs using PowerShell. PowerShell has native libraries that search both formats for you without creating any kind of elaborate code....

.NET

.NET Troubleshooting and Analyzing

The whole purpose of logging is for future root cause analysis and monitoring. If you support small applications, you might not need the extensive logging and troubleshooting, but enterprise applications span several departments, layers, and network resources. Troubleshooting and analyzing each application component can drag out the root cause analysis process unnecessarily. With your logs, you can much more easily pinpoint the error right down to the exact line of...

.NET

.NET Logging for Security

We spoke a lot about logging for error exceptions and handling, but what we haven’t mentioned yet is logging for security. As the web continues to offer more opportunities for hackers to obtain data that can then be sold for profit, application developers should be more conscientious about logging security events. These events should be logged for both internal and external users as even insider threats pose a problem for...

This guide will help software developers and system administrators become experts at using logs to better run their systems. This is a vendor-neutral, community effort featuring examples from a variety of solutions. Each guide includes:

  • A basic overview of what’s in the logs and where to find them
  • How to search or analyze logs to find valuable information
  • How to troubleshoot common issues and find the root cause
  • How to centralize or aggregate logs in a large distributed system

This guide will help software developers and system administrators become experts at using logs to better run their systems. This is a vendor-neutral, community effort featuring examples from a variety of solutions

Meet Our Contributors Become a contributor