Plugin Directory

Changeset 3250507


Ignore:
Timestamp:
03/04/2025 02:41:17 PM (13 months ago)
Author:
recruitly
Message:

Fix logging issue

Location:
recruitly/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • recruitly/trunk/admin/dataloader.php

    r3246395 r3250507  
    11241124 * @param $exception Exception
    11251125 */
    1126 function recruitly_log_exception(Exception $exception)
    1127 {
    1128     try {
    1129         //error_log(print_r($exception->getTraceAsString(), true));
     1126function recruitly_log_exception(Throwable $exception)
     1127{
     1128    try {
     1129        $error_message = sprintf(
     1130            "[%s] %s: %s in %s on line %d\nStack trace:\n%s\n",
     1131            date("Y-m-d H:i:s"),
     1132            get_class($exception), // Gets the exact exception type (e.g., TypeError, Exception)
     1133            $exception->getMessage(),
     1134            $exception->getFile(),
     1135            $exception->getLine(),
     1136            $exception->getTraceAsString()
     1137        );
     1138
     1139        error_log($error_message); // Logs the error to the PHP error log
     1140
     1141        // Optionally, you can log it to a custom file:
     1142        file_put_contents(WP_CONTENT_DIR . '/recruitly-error.log', $error_message, FILE_APPEND);
    11301143    } catch (Throwable $e) {
     1144        error_log("Failed to log exception: " . $e->getMessage());
    11311145    }
    11321146}
  • recruitly/trunk/readme.txt

    r3246395 r3250507  
    44Requires at least: 4.5
    55Tested up to: 6.7.1
    6 Stable tag: 2.0.28
     6Stable tag: 2.0.29
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    125125* Fix issue with multiple sectors in taxonomies.
    126126
     127= 2.0.29 =
     128* Fix issue logger issue.
     129
    127130== Upgrade Notice ==
    128131
    129 = 2.0.24 =
    130 Issue with the search filter has been resolved.
     132= 2.0.28 =
     133Version 2.0.28 has a breaking change, Please upgrade to 2.0.29.
  • recruitly/trunk/recruitly.php

    r3246395 r3250507  
    44Plugin URI: https://recruitly.io
    55Description: Recruitly job board integration.
    6 Version: 2.0.28
     6Version: 2.0.29
    77Author: Recruitly
    88Author URI: https://recruitly.io
     
    1515    exit; // Exit if accessed directly
    1616}
    17 define('RECRUITLY_PLUGIN_VERSION', '2.0.28');
     17define('RECRUITLY_PLUGIN_VERSION', '2.0.29');
    1818
    1919defined('RECRUITLY_POST_TYPE') or define('RECRUITLY_POST_TYPE', 'current-vacancies');
Note: See TracChangeset for help on using the changeset viewer.