nsu_log.class.php 332 B

12345678910111213
  1. <?php
  2. class ApiNSULog
  3. {
  4. public static function getLogId()
  5. {
  6. return '#' . bin2hex(random_bytes(10)) . '#';
  7. }
  8. public static function invoiceLog(string $message): void
  9. {
  10. $dateSuffix = date("Ymd", dol_now());
  11. dol_syslog($message, LOG_INFO, 0, '_invoice_' . $dateSuffix);
  12. }
  13. }