Skip to content

Bug: Logger path property ignored #2725

Description

@dafriend

CI V 4.0.2 on develop at commit 84b9cc

Affected module(s)
CodeIgniter\Log\Logger

Expected behavior, and steps to reproduce if appropriate
Config\Logger::path setting is not used as the value for where to save log files.

Reproduce by setting some folder other than the default in Config\Logger::path e.g.

public $path = WRITEPATH . 'uploads/';

Then log something somewhere, e.g.

<?php namespace App\Controllers;

class Home extends BaseController
{
    public function index()
    {
	$this->logger->emergency("This will not be written to a file in the WRITEPATH/uploads folder");
	return view('welcome_message');
    }
}

File will be written to WRITEPATH/logs instead of WRITEPATH/luploads.

Context

  • Linux Debian 10
  • Apache/2.4.38 (Debian)
  • PHP version 7.3.14

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions