WDL: Watchdog Logger - triplei-group/SERP GitHub Wiki
Purpose WDL (Watchdog Logger) is a core module in the SERP platform responsible for registering, analyzing, and tracking both system-level and user-generated events.
Responsibilities Log system events (e.g., errors, service restarts)
Log user interactions (e.g., login, config changes)
Timestamp all events for traceability
Enable event filtering, querying, and categorization
Provide a reliable and structured audit trail Unified Logging Time Standard For consistency across all SERP modules, which are being developed by programmers from different countries and may use different local date systems, the UNIX timestamp has been adopted as the standard base format for time logging.
This ensures that logs from various submodules—regardless of their language, region, or developer—remain interoperable and accurately traceable.
Usage Guidelines
Simply convert the Gregorian date and time (with specified timezone) to a UNIX timestamp.
For display, reverse the process using the same timezone.
First convert the Jalali date to Gregorian using the jDateTime library by Sallar Kaboli
Then convert the Gregorian date to a UNIX timestamp.
The jDateTime library supports high-precision Jalali-Gregorian conversions and can be directly embedded into your PHP-based modules.
Utility Functions To simplify integration, here are two reusable helper methods for modules working with Persian (Jalali) dates:
-
Convert Jalali date + time to UNIX timestamp
-
Convert UNIX timestamp to Jalali date (localized)
These can be used across SERP-compatible modules to ensure accurate and standardized logging.