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

Where can I find phpcensor logs. #59

Closed
ketchoop opened this issue Apr 10, 2017 · 3 comments
Closed

Where can I find phpcensor logs. #59

ketchoop opened this issue Apr 10, 2017 · 3 comments

Comments

@ketchoop
Copy link
Contributor

ketchoop commented Apr 10, 2017

It's not obvious. For example, I've got error about database and I can see it, when I try to create new admin, but, you know, it shouldn't be this way :). I know, it's silly question but, It's harmful to get into source code and try to find out where logger is configured.

@ketchoop ketchoop changed the title Where I can find phpcensor logs. Where can I find phpcensor logs. Apr 10, 2017
@corpsee
Copy link
Member

corpsee commented Apr 10, 2017

You need to create loggerconfig.php file in app directory with content like:

<?php

return [
    /** Loggers attached to every command */
    "_" => function() {
        return [
            new \Monolog\Handler\StreamHandler(RUNTIME_DIR . 'errors.log', \Monolog\Logger::ERROR),
        ];
    }
];

It should helps you.

@corpsee
Copy link
Member

corpsee commented Apr 10, 2017

I will plan to remove this ugly config and move logging settings to main application config.

@corpsee
Copy link
Member

corpsee commented May 23, 2017

Fixed.

@corpsee corpsee closed this as completed May 23, 2017
@corpsee corpsee added this to the Version 1.0 milestone Dec 23, 2018
@corpsee corpsee removed this from the Version 1.0.* (patch) milestone May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants