You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LuLog.php 531B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Luticate\Utils\Business;
  3. class LuLog {
  4. /**
  5. * @var $_logFilePath string
  6. */
  7. private static $_logFilePath;
  8. public static function setLogFilePath($logFilePath) {
  9. self::$_logFilePath = $logFilePath;
  10. }
  11. public static function log($data)
  12. {
  13. try {
  14. file_put_contents(self::$_logFilePath, "\n\n\n" . $data, FILE_APPEND);
  15. }
  16. catch (\Exception $e)
  17. {
  18. }
  19. catch (\Error $e)
  20. {
  21. }
  22. }
  23. }