Skip to content

Updating the log system with env variable #3551

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

Merged
merged 1 commit into from
Nov 6, 2015
Merged

Updating the log system with env variable #3551

merged 1 commit into from
Nov 6, 2015

Conversation

arcanedev-maroc
Copy link
Contributor

The single log system is only useful in dev/local environment.

@GrahamCampbell
Copy link
Member

The default shouldn't be changed from single.

@GrahamCampbell
Copy link
Member

This PR does two things.

@GrahamCampbell
Copy link
Member

The single log system is only useful in dev/local environment.

Not true actually.

@arcanedev-maroc
Copy link
Contributor Author

@GrahamCampbell
What are the benefits of using single log system in production env ?

@GrahamCampbell
Copy link
Member

What are the benefits of using single log system in production env ?

You might be using a system outside of laravel's control to process that single log file, like logrotate.

@arcanedev-maroc
Copy link
Contributor Author

Why using a system outside of laravel's control ?

I'm sure a lot of artisans like to see their log files inside their apps by using log viewer packages.

For example : LogViewer Package

@GrahamCampbell
Copy link
Member

I'm sure they do. That's why it's configurable.

@rkgrep
Copy link

rkgrep commented Nov 5, 2015

👍 for .env variable, 👎 for daily log by default

@Anahkiasen
Copy link
Contributor

Yeah same here, I don't like the default but I don't think there is a default that would please everyone, on the other hand I would like it to be an env variable

@arcanedev-maroc
Copy link
Contributor Author

Is there any other good reason of using single (or not using daily) log system on production mode (by default) inside laravel's control ?

This is the benefits of using daily logs in my opinion:

  • Keeping log files small/readable/manageable after months/years of use.
  • Archives-able/downloadable logs files.
  • Avoiding the performance issues while reading/writting.
  • You can concatenate all the daily files into a single file with ease (By years or by months if you want).
  • Friendly with log viewer packages.

@brunogaspar
Copy link
Contributor

Having it on the .env file would be nice, but i also prefer single.

@GrahamCampbell
Copy link
Member

Yeh, you shouldn't change two things in a single PR. Please just make the env change here.

@arcanedev-maroc
Copy link
Contributor Author

@GrahamCampbell
OK, but first i want to be sure about the default log system before i rebase this PR.

It's debatable and good to know how the others think about it.

@brunogaspar @rkgrep Please, be more specific about your choice.

@brunogaspar
Copy link
Contributor

OK, but first i want to be sure about the default log system before i rebase this PR.

It's easy, keep the single as @GrahamCampbell mentioned but use the env variable. Then send a different PR as proposal to change from single to daily.

Please, be more specific about your choice.

  • I have only one file to delete instead of multiple.
  • I have only one file to read instead of multiple.
  • I have only one file to download instead of multiple if i ever have the need to.
  • I find it easier to find errors on one file, even if the file is big, we can search.
  • One file for development is more easier that multiple IMHO.

Don't take me wrong and i do see your point, but you need to see ours as well.

Laravel makes it easy to start development with a minimum configuration required, once you go to production, just do your preparations like everyone should be doing, like set the env to production, set debug to false, in your case set the log to daily instead of single.

Just because you fancy for daily during development, not everyone likes that, i'm included.
Since single is default at the moment, you should adapt your application(s) to use daily, it's impossible to please everyone :)

@arcanedev-maroc arcanedev-maroc changed the title Replacing single log system by daily (env variable supported) Updating the log system with env variable Nov 5, 2015
@shehi
Copy link

shehi commented Nov 5, 2015

Why the community is wasting time on not important details is beyond me. Who cares if its single or not?! We can change it with one single word edit. Simple.

If you guys want to save everyone's times - yes, everyone's, as we all receive notifications for these PRs - please create Contribution Guidelines and ban all these nonsensical contributions to the package which would take 2-3 word replacements from any developer using it. Really tired of these nonsensical PRs. And please don't start another nonsense with notions like "Then unsubscribe-from/unwatch the project." If you think it's a contribution to Laravel, guess what, it is NOT! Go create something useful for God's sake: improve NoSQL driver for it or some other OAuth-2 integration, whatever you want...

@arcanedev-maroc
Copy link
Contributor Author

@shehi I'm here to contribute and share my ideas/opinions. Do you think this is a waste of time ?

@brunogaspar thanks for sharing your opinion 👍

@GrahamCampbell I've rebased the PR.

@shehi
Copy link

shehi commented Nov 5, 2015

@arcanedev-maroc : I do mate (re this specific topic here). Nothing personal. You are not the first, and won't be the last anyway :(

@arcanedev-maroc
Copy link
Contributor Author

@shehi

If you think it's a contribution to Laravel, guess what, it is NOT! Go create something useful for God's sake: improve NoSQL driver for it or some other OAuth-2 integration, whatever you want...

Check my repos : https://github.com/ARCANEDEV

This may helps you : https://speakerdeck.com/mattstauffer/empathy-gives-you-superpowers

👍

@mateusjatenee
Copy link

👍 for .env.

taylorotwell added a commit that referenced this pull request Nov 6, 2015
Updating the log system with env variable
@taylorotwell taylorotwell merged commit 8476df5 into laravel:master Nov 6, 2015
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.

8 participants