Type Integer
In LogHub, the Log Type is a critical attribute used to categorize and prioritize logs. It helps in organizing and filtering logs based on the severity or nature of the event, making it easier to monitor and manage your projects.
The Log Type is represented as a string and can be one of the following values:
- 1 – INFO: Used for general informational logs that describe routine operations or events. These logs are typically non-critical and provide insights into the normal flow of your application.
Example: “User logged in successfully.” - 2 – SUCCESS: Indicates that a specific action or process was completed successfully. These logs confirm the successful completion of tasks, making them useful for tracking positive outcomes in your system.
Example: “Order processed successfully.” - 3- WARNING: Represents potential issues that are not yet critical but might require attention. Warnings are often used for minor errors or alerts that should be investigated before they escalate.
Example: “Disk space usage is nearing capacity.” - 4 – DANGER: A more serious type of log than WARNING, DANGER logs are used to signal conditions that require immediate attention. These are typically logged when the system detects a major issue that, if left unresolved, could cause significant problems.
Example: “Unauthorized access attempt detected.” - 5 – ERROR: Logs of this type indicate a failure in the system. ERROR logs represent events where something has gone wrong, often requiring immediate troubleshooting or action.
Example: “Database connection failed.” - 6 – ACTION: This type is used to track user or system actions that may be important to monitor. ACTION logs are particularly useful for auditing or understanding user behavior within an application.
Example: “Admin changed system settings.”
By assigning the appropriate Log Type to each event, you can categorize logs in a meaningful way, making it easier to manage and monitor your projects over time. In LogHub, these types not only help with organizing logs but also play a key role in the visual charts and insights provided in the dashboard, helping you detect patterns and prioritize issues effectively.