0

Have configured log4php module with Drupal 7 after trying out with many patches available. Module got successfully installed after following this one https://drupal.org/node/1921258

Still no log in .log file. Tested with basic PHP applications to make sure if log4php is installed properly. It does work with my test application.

No luck with Drupal 7.

Thank you for helping out.

1 Answers1

0

Not sure of why but replacing these lines in log4php.module file

    function _log4php_get_path() {
      // Check for preferred PEAR installation (or within module directory)
      if (file_exists('log4php/Logger.php')) {
        $path = 'log4php/Logger.php';
      }
      elseif (module_exists('libraries')) {
        // Use Libraries module, if available
        if (file_exists(libraries_get_path('log4php') . '/Logger.php')) {
          // check if the library is in the recommended location
          $path = libraries_get_path('log4php') . '/Logger.php';
        }
        elseif (file_exists(libraries_get_path('log4php') . '/src/main/php/Logger.php')) {
          // check if the library has been downloaded directly into libraries folder
          // this caters for drush make files
          $path = libraries_get_path('log4php') . '/src/main/php/Logger.php';
        }
      }

      return isset($path) ? $path : NULL;
    }

with this

    function _log4php_get_path() {
      // Check for preferred PEAR installation (or within module directory)
        $path = 'log4php/Logger.php';
            return $path;
    } 

did worked today. Now watchdog events are being logged in .log file.