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

Logs #4

Closed
89gsc opened this issue Sep 22, 2016 · 3 comments
Closed

Logs #4

89gsc opened this issue Sep 22, 2016 · 3 comments

Comments

@89gsc
Copy link

89gsc commented Sep 22, 2016

Gave log directory 777 permissions and owner / group is correct but I only get errors about being unable to create the file.

Is there anyway to set the file name to something like sql.log so I can manually make the file so this isn't happening.

@mnabialek
Copy link
Owner

At the moment it's not possible, maybe in future versions will be. However it seems to be a problem with your server permissions. Probably your www user is not the same as user you are logged in console and that's why you are getting those errors.

@klaravel
Copy link

klaravel commented Oct 3, 2016

When "sql" directory in log folder is not there it's generating error.

Either if we create manually or I have clone this package and added below code in beginning of function and working great.

File: https://github.com/mnabialek/laravel-sql-logger/blob/master/src/SqlLogger.php
Function: saveLog

if (!file_exists($this->directory)) {
   mkdir($this->directory, 0777, true);
}

@mnabialek
Copy link
Owner

This is expected behaviour. You need to create directory manually. We don't want to check if directory exists each time because of performance

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

No branches or pull requests

3 participants