Giter Site home page Giter Site logo

Comments (5)

ow avatar ow commented on September 22, 2024

In case anyone stumbles on this, obviously the GetStream folks aren't interested in helping so you can use my own fork, which actually removes the error/suppresses it from being shown to your users. https://github.com/ow/stream-laravel

from stream-laravel.

tbarbugli avatar tbarbugli commented on September 22, 2024

@ow sorry, we missed this issue on Github, we are always happy to help :)

AFAIK the best solution here is to change your Laravel configuration to not write log messages to stdout when running on a production environment and to do that on your dev environment.

The relevant docs are available here: https://laravel.com/docs/5.8/logging#introduction

from stream-laravel.

ow avatar ow commented on September 22, 2024

@tbarbugli All good—but that's not the case. You can't use Log::info in a blade file, so it just blobs it out into HTML since that is essentially a string there anyway... I didn't see this until 100-200 of my users were complaining about it in production, which was because it was unable to enrich a scoped post. Fair enough, but I'd rather it failed silently than look like I can't configure errors!

The best way to deal with this would be to stop including Log::warning('The activity could not be rendered, the following field/refs could not be enriched:', $activity->getNotEnrichedData()); in your blade template, because you can't run that Blade-side. That's all I removed in my fork. :)

from stream-laravel.

tbarbugli avatar tbarbugli commented on September 22, 2024

that's strange :) is Log in that scope something else than Laravel's Log facade?

from stream-laravel.

ow avatar ow commented on September 22, 2024

No, it's just that you cannot log from a Blade template with the built-in logger, which is what you're trying to do here: https://github.com/GetStream/stream-laravel/blob/5870fb272fa2aa0b9c1f7f893a044ceb39d588f1/src/views/render_activity.blade.php

from stream-laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.