-
Notifications
You must be signed in to change notification settings - Fork 0
Enhancers: SystemContextEnhancer
alessbarb edited this page Sep 20, 2023
·
3 revisions
File: system-context.enhancer.ts
The SystemContextEnhancer class enriches error objects with system-level context information. It includes details about the operating environment, system hardware, and the Node.js runtime. This class is particularly useful for diagnosing issues that may be dependent on the system where the error occurred.
| Property | Description |
|---|---|
hostname |
The system's hostname. |
cpuArch |
The system's CPU architecture. |
osType |
The type of the operating system. |
osRelease |
The release version of the operating system. |
systemUptime |
The system's uptime in seconds. |
Refreshes the system uptime information. Useful when you need the most up-to-date info.
Usage Example:
systemContext.refreshSystemInfo();Returns the system's hostname.
Returns the system's CPU architecture.
Returns the type of the operating system.
Returns the release version of the operating system.
Returns the system's uptime in seconds.
- Debugging: The class is useful for debugging errors that may be system-specific.
- Monitoring: Can be used in system monitoring solutions to add contextual information about the environment.
error-enhanced Wiki
Version: 1.2.1 - © 2023
🔗 MIT License | 📦 GitHub Repository | 🐞 Report Issues | ✉️ Contact