Analyzing Logs
| Document status | 35 - Reviewed |
|---|
Application logs capture a chronological trail of events occurring inside the software system. These entries may include diagnostic information, warnings, errors, and operational details at varying levels of severity. When troubleshooting, logs are often the primary entry point for investigation. Examining what happened immediately before and during an incident helps developers understand system behavior, pinpoint where a failure originated, and form a hypothesis about its root cause.
Working with Seq
Seq is the log management tool available within the local development environment.
While logs offer the context needed to understand what led to an issue, Seq provides a fast and structured way to analyze this information, making it easier to trace the problem’s origin.
Start investigations by reviewing the logs in Seq, then progressively narrow your search until the root cause becomes clear.
Seq provides:
-
Structured access to log data for easier exploration
-
Filtering and searching capabilities to quickly locate relevant events
-
A web-based interface for interactive log analysis
Developers can access Seq locally at:
http://localhost:5341
Exploring Logs in Seq
The Seq interface displays an interactive event stream, allowing developers to:
-
Browse log entries as they are ingested in real time
-
Select individual entries to view detailed metadata, such as timestamps, log levels, exception traces, and correlation identifiers
-
Apply filters and search terms to concentrate on a specific time frame, service, or message type
This enables you to focus on the portion of the logs most relevant to the issue under investigation.
Querying Log Data
Seq includes a simple query language that makes it possible to narrow down large sets of log data efficiently. Example: To see only log entries generated in the past hour:
@Timestamp >= Now() - 1h
Once a time range has been isolated, you can continue refining the query to focus on more specific details, such as:
-
Log level:
@Level = 'Error' -
Application component:
Source = 'EnergyConnect.Api' -
Message text:
Message like '%timeout%'
Applying multiple filters iteratively helps you zero in on the exact sequence of events contributing to the problem.