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

Allow stream_name configuration value to be a callable #29

Closed
wants to merge 1 commit into from

Conversation

fish3046
Copy link

This implements a helpful feature for me and my team. The requirements:

  1. Have two different Cloudwatch log streams, one for web traffic and one for background worker traffic
  2. Have config:cache executed on production

I had something like 'stream_name' => app()->runningInConsole() ? 'laravel-worker' : 'laravel' in the config, but cache:config would process this and always end up as laravel-worker, even for web traffic.

This feature would let you do things like 'stream_name' => [CallableStreamNameGenerator::class, 'generateStreamName'] to fetch the stream name at run time.

@fish3046 fish3046 closed this Nov 29, 2023
@fish3046 fish3046 deleted the callable-stream-name branch November 29, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant