Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional $path argument for AccessLogHandler #247

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

clue
Copy link
Owner

@clue clue commented Feb 28, 2024

This changeset adds a new optional $path argument to the AccessLogHandler. If you do not want to log to the console, you can now configure an absolute log file path by passing an argument to the AccessLogHandler like this:

<?php

require __DIR__ . '/../vendor/autoload.php';

$container = new FrameworkX\Container([
    'accesslog' => __DIR__ . '/../logs/access.log',
    FrameworkX\AccessLogHandler::class => fn(string $accesslog) => new FrameworkX\AccessLogHandler($accesslog)
]);

$app = new FrameworkX\App($container);

// …

We will add more options to control access logging in follow-up PRs as discussed in #169.

Builds on top of #222, #175, #174, #31 and others

@clue clue added the new feature New feature or request label Feb 28, 2024
@clue clue requested a review from SimonFrings February 28, 2024 16:23
Copy link
Contributor

@SimonFrings SimonFrings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, let's get this in 👍

@SimonFrings SimonFrings merged commit 88d23bc into clue:main Feb 29, 2024
58 checks passed
@SimonFrings SimonFrings deleted the accesslog-path branch February 29, 2024 15:24
@SimonFrings SimonFrings added this to the v0.16.0 milestone Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants