-
Notifications
You must be signed in to change notification settings - Fork 64
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
Stack channel logging issue #27
Comments
Hi, that's an interesting approach and I like it. However, we need to make sure that the logger does not try to write to disk: would you solution make sure of that? |
Well we could filter channels to remove all that use filesystem as storage. User still could use some custom channel that writes to disk, but I think the risk is very low. // We remove single and daily channels and ensure that stderr is used
$logDriver = Config::get('logging.default');
if ($logDriver === 'stack') {
$channels = array_filter(Config::get('logging.channels.stack.channels', []), function ($value) {
return !in_array($value, ['single', 'daily']);
});
array_push($channels, 'stderr');
Config::set('logging.channels.stack.channels', array_unique($channels));
} It's not a perfect solution, but I think can solve most use cases. Syslog and errorlog aren't a problem, right? |
Right, that makes sense. However that sounds fragile to me: new versions of Laravel could very well rename I would love to find a solution that's a bit more reliable for the future, but I'm not sure what/how 🤔 |
As one who also uses Bugsnag and is looking to use this project in production, I'd rather accept the risk of the filesystem being implemented in a Laravel upgrade where my radar is up for potential issues than sacrifice Bugsnag support. So I'd be a fan of just eliminating the logging file aliases. |
The variable name I think the easiest solution just set the 'lambda-stack' => [
'driver' => 'stack',
'channels' => [
'bugsnag',
'stderr',
],
'ignore_exceptions' => false,
], |
Just got stung by this issue while trying to add Flare to the stack log channel. One solution might be to add a new log channel named In any case, this issue definitely needs mentioning in the docs. |
* Ensure valid handle to stderr * Update runtime.php Co-authored-by: Till Krüss <[email protected]>
Hey! I'm having an issue when using the package because of line 46 of BrefServiceProvider:
We're using multi-channel logging, and our stack channel already include stderr. Config bellow:
When using the package the bugsnag just stop working.
Couldn't we just leave this to user or at least change approach to just ensure stack contains stderr instead of changing logging.default (like below example)?
The text was updated successfully, but these errors were encountered: