Configuring (and viewing!) logs in Laravel

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 76

  • @lotfiabdallah5110
    @lotfiabdallah5110 2 месяца назад +15

    I clicked "Do not recommend channel" on theo and friends years ago, I totally recommend this.

  • @senpos
    @senpos 2 месяца назад +11

    Laravel looks very user-friendly and complete.
    They have everything!
    As a Python developer, I wish more stuff like that was available in Django out of the box.
    Enjoyed the video!

    • @SiddharthPant
      @SiddharthPant 2 месяца назад +3

      Yeah man, mentioning what I wrote in another comment, my blog article on medium about Django logging missing how to is still one of my most read article. Here Laravel ecosystem has it by default nicely put in a config file for you to change two lines and forget about it as it covers all your needs.

  • @soyarenamovediza6498
    @soyarenamovediza6498 2 месяца назад

    Last week I was looking for a nice way to see my logs and I didn’t know anything about pail. Thanks!!! It is just what I needed ❤

  • @Trance_Code
    @Trance_Code 2 месяца назад

    I think the best tool for Log is Sentry... a really powerful extension and service...
    Thank you Aaron for share!

  • @mikechurvis2762
    @mikechurvis2762 2 месяца назад +1

    At our firm we've found that Sentry is great for exception reporting. It should NOT, however, be used for *direct* logging using the Log channel. Log events are never as rich as exceptions, but they'll show up as their own event anyway, indistinguishable from exception events until you drill into them. It is better, in our experience, to stick with Sentry's default behavior where logs written prior to an exception will be reported *within* the exception event as breadcrumbs.
    I'd love to see a video from you on open-source browser-based log viewers, or how to aggregate logs from multiple apps. Good content as always, sir!

  • @carlhostetler4209
    @carlhostetler4209 2 месяца назад +1

    Thanks, I needed this one. Coming from a different ecosystem I struggled to find all the feedback that I am use to.
    And I definitely read through the doc on log stacks and got a bit overwhelmed 😅

  • @theneverything
    @theneverything 2 месяца назад

    Very helpful! Personally I use Sentry and daily logs in production and it works really well.

  • @RafaelMilewski
    @RafaelMilewski 2 месяца назад +46

    Is this a video response to theo? 😅

    • @yewnork
      @yewnork 2 месяца назад +2

      my thought as well lol.

    • @dissident1337
      @dissident1337 2 месяца назад +22

      My dude never even left the intro page of the docs and got mad he couldn't use a feature correctly. Absolutely embarrassing.

    • @Kay8B
      @Kay8B 2 месяца назад +7

      His attempt was pathetic, he barely got started or read one paragraph in the documentation and began crying when he didn't understand why nothing worked.

    • @Pekz00r
      @Pekz00r 2 месяца назад +6

      ​@@Kay8BYes, and the worst part was that everything was working, but he still expected errors in the log. He didn't even realize that when he saw the images where uploaded like they should.
      It was really weird that that a seasoned web dev like him didn't even check the dev tools in the browser to see what was going on. Then he would have seen that the form posted just like it should.

    • @MrVimkaf
      @MrVimkaf 2 месяца назад +11

      Theo never really wanted to learn laravel. I guess he was looking for rants and bants. Any cool headed person that can follow the docs or guide will find it easy to setup and deploy.

  • @SiddharthPant
    @SiddharthPant 2 месяца назад +1

    This is a very good video. Atleast after all this twitter drama I got to know about Laravel Pail and the log channels today. Some drama driven learning going on here. Really unfortunate that I saw lots of people in Theo's stream immediatly justifying staying away from such an extensive feature set, just because somebody else is angry. Coming from Django world where I wrote a blog on how to do loggin right and its still one of my most read blogs in medium because its that confusing. I can immediatly see the benifits of Laravel's logging setup. It fulfills all the needs that I have faced till now in my projects in Django.

    • @aarondfrancis
      @aarondfrancis  2 месяца назад +1

      I appreciate you saying that! Thank you.

  • @Frank-ou2nr
    @Frank-ou2nr 2 месяца назад

    Great video! You mentioned that Ray can only be used to debug locally. While that sure is easy, they also suppport SSH connections to remote servers.

  • @etherbeans
    @etherbeans 2 месяца назад +15

    and now, back to our regularly scheduled programming

  • @JustPlayerDE
    @JustPlayerDE 2 месяца назад

    Great video!
    If you use laravel sail (or any other docker setup for dev) you can also use the "stderr" log driver/output to log everything to the terminal inside the docker container, this is what i use if i work with sail. wont look as nice as pail though.
    Another interesting alternative to sentry i can recommend is glitchtip, may not have that many features but a lot less resource requirements and is also fully opensource.

  • @geradtroje4653
    @geradtroje4653 2 месяца назад

    Well done. Thanks Aaron.

  • @JonathanAlexeyPereiraFontes
    @JonathanAlexeyPereiraFontes 2 месяца назад

    Thank you show that Laravel is best option! :)

  • @curious.coder.X
    @curious.coder.X 2 месяца назад +1

    Hello Aaron, I love your laravel videos.
    I am also a laravel developer, and would request you to please cover Jobs and Queues in Laravel in a multi-tenant application in details using database and AWS SQS driver.
    I have tried many ways to make things work but it seems whenever I change DB inside a JOB, there is some null exception error from JOB class.
    Also the bus (Batch Job processing), dont update the in_progress, error etc status, when I switch DB from a Job Class, lets say SendEmailViaJob.
    Basically I have multiple DBs and I have to switch to a specific DB (whose information is in payload of JOB) and do the processing in that DB, and then change the DB to a base db.
    Hope you find this topic interesting, and cover it, so that we can apply what is the standard way.

  • @OstapBrehin
    @OstapBrehin 2 месяца назад

    Legend as usual

  • @globiws
    @globiws 2 месяца назад

    tail might be uninspired, but it works.
    For a more inspired and cross-app log viewer, there's also lnav

  • @MrNichuya
    @MrNichuya 2 месяца назад +8

    I knew that this reactjs youtuber would only bring trouble

    • @aarondfrancis
      @aarondfrancis  2 месяца назад +8

      Laravel is huge, it can be confusing knowing what parts to use. I didn't love his anger, but I get the confusion

    • @MrNichuya
      @MrNichuya 2 месяца назад +1

      you are too kind

    • @chrispian
      @chrispian 2 месяца назад +1

      @@aarondfrancis Same. We've all done what he did in the video but it seemed like a bit of an over reaction. Not my favorite style of video content.

    • @DirkZz
      @DirkZz 2 месяца назад +2

      The only bit for which the reactjs youtuber got excited was the idea that this might even cause a PR drama for Laravel. I found it a bit weird to say, but given how he approached the whole ordeal, it makes sense for him, I guess.

  • @barbapapazes
    @barbapapazes 2 месяца назад

    Really nice video!

  • @islandblaze007
    @islandblaze007 2 месяца назад

    @Aaron, looks like your audio is a smidge out of sync with the video on this one. I don’t mind it much since your content is always top notch!

  • @underflowexception
    @underflowexception 2 месяца назад

    You may need to set the correct permissions on the file and parent folder as well.. I usually always run into permission issues.

  • @RobertoDuransh
    @RobertoDuransh 2 месяца назад

    as always awesome video!!!.
    here is an idea for a video - automatic API documentation with tools like dedoc/scramble

  • @JenuelDevTutors
    @JenuelDevTutors 2 месяца назад

    thanks for this video,, what code editor are you using?

  • @jimblonde2523
    @jimblonde2523 2 месяца назад +3

    I like to put my logs into json formatter and then pipe the tail in jq .

    • @aarondfrancis
      @aarondfrancis  2 месяца назад +1

      Oh that's fun! Never done that

  • @thedavistheory7674
    @thedavistheory7674 2 месяца назад

    I knew this would happen, any final thoughts Aaron?

  • @sinaahmadpour3180
    @sinaahmadpour3180 2 месяца назад

    It's a dumb question! sorry , but how did you maximize the chrome with keyboard shortcut?

  • @navaneeth6157
    @navaneeth6157 Месяц назад

    Can we log to the console or logging to the file is best?

  • @JoachimMuratsGhost
    @JoachimMuratsGhost 2 месяца назад

    If telescope isn't recommended for production, what should I use to track slow requests? I know pulse has something like this, but it doesn't tell me what users are experiencing the slow requests.

    • @BrunoBernard-kn6vt
      @BrunoBernard-kn6vt 2 месяца назад +1

      Use an APM (Application performance Monitoring) tool. Sentry is one

    • @zohaibhassan156
      @zohaibhassan156 2 месяца назад

      you can use telescope in production with conditions. like log only if there's error in request. or log whole batch of request if there's error. log only monitored users.

  • @JustSomeObject
    @JustSomeObject 2 месяца назад

    I use telescope on production on a SaaS with about 10,000 active users, t4g micro database and t4g micro ec2. It's fine
    Just don't log every tiny thing in telescope, it's configurable

  • @raiyansarker
    @raiyansarker 2 месяца назад

    why isn't it configured out of the box? I mean a mailer is present by default but not better logging?

  • @dimitrisborbotsialos
    @dimitrisborbotsialos 2 месяца назад

    Elasticsearch + Kibana

  • @ryangjchandler
    @ryangjchandler 2 месяца назад +3

    First? (Not sure if I'm doing this right...)

  • @RobertoRenovato
    @RobertoRenovato 2 месяца назад +2

    Wait, aren't you required to pay for Herd Pro to view your logs? 😏

    • @DirkZz
      @DirkZz 2 месяца назад +2

      That would have been an amazing (trol) intro, walking through the purchase of Herd and viewing the logs 😄

    • @SiddharthPant
      @SiddharthPant 2 месяца назад +3

      Aaron mentions that in the video. TLDR: there are free CLI or GUI tools and paid GUI tools. All are pretty good options and actively developed. Based on your needs you can go with anyone. Unfortunately there are no "soon to be abandoned because new thing exists" options, you go with JS for that.

    • @RobertoRenovato
      @RobertoRenovato 2 месяца назад

      ​@@SiddharthPant I think you didn't catch the joke (context) here. 😉

  • @francismori7
    @francismori7 2 месяца назад +1

    I use Telescope in prod lol

  • @vivekkapoor2537
    @vivekkapoor2537 2 месяца назад

    Can you make a video for how to implement In App Purchase for Apple and Google for Subscription and Product

  • @rasalas91
    @rasalas91 2 месяца назад

    I went blind, I want reparations 💰
    (it's 23:28 o clock and I was not prepared after a 9h 30min coding session that really hurt my brain)

  • @stefanzweifel
    @stefanzweifel 2 месяца назад +1

    Good (sub)-video!