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 context to ApplicationLog #562

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Add context to ApplicationLog #562

merged 1 commit into from
Nov 17, 2021

Conversation

keithbrink
Copy link
Contributor

When logging, there can sometimes be additional context in the the log that would be useful to display in Ray.

This doesn't implement anything other than adding an additional argument to the constructor; the formatting will need to be implemented in the server. Additionally, the watcher in the Laravel package (and I presume the rest of the framework-specific packages) will need to be updated to pass in the context from the message object:

laravel/ray Spatie\LaravelRay\Watchers/ApplicationLogWatcher:24
$payload = new ApplicationLogPayload($message->message, $message->context);

This PR is relatively useless as the real work is done on the server-side, just putting it out there as the first step to implementing #257.

When logging, there can sometimes be additional context in the the log that would be useful to display in the 

This doesn't implement anything other than adding an additional argument to the constructor; the formatting will need to be implemented in the server. Additionally, the watcher in the Laravel package (and I presume the rest of the framework-specific packages) will need to be updated to pass in the context from the message object:

laravel/ray Spatie\LaravelRay\Watchers/ApplicationLogWatcher:24
`$payload = new ApplicationLogPayload($message->message, $message->context);`

This PR is relatively useless as the real work is done on the server-side, just putting it out there as the first step to implementing spatie#257.
@freekmurze freekmurze merged commit 037b18d into spatie:main Nov 17, 2021
@freekmurze
Copy link
Member

I'm already going to merge this in, we'll update the main app at some later point in time.

@keithbrink keithbrink deleted the patch-1 branch November 17, 2021 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants