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

PHP - Monolog loglevel missing Handler #266

Open
basert opened this issue Mar 2, 2015 · 6 comments
Open

PHP - Monolog loglevel missing Handler #266

basert opened this issue Mar 2, 2015 · 6 comments

Comments

@basert
Copy link

basert commented Mar 2, 2015

With the 1.3 branch of the PHP version of steam-condenser, monolog was added which is great, as it gets rid of the trigger_error usage.

But unfortunately, no handlers are implemented and because of that, it falls back to standard console output and DEBUG loglevel. It would be great to add a handler and set a default loglevel which is customizable (as I don't need to fetch the RCON logs)

Best regards,
Fabian

@koraktor
Copy link
Owner

koraktor commented Mar 3, 2015

Thanks for your feedback.

Monolog support is still experimental (it's only on the master branch). To be honest, I still don't had the time and experience to fine-tune this.

Maybe it would be a first step to make the static $log instances public so you can customize them directly. Additionally, it might be good to add some sort of global customization that allows to configure Monlog for Steam Condenser as a whole.

Feel free to send a pull request if you want to help with this.

@koraktor
Copy link
Owner

As commented on koraktor/steam-condenser-php#21 complying to PSR-3 seems to be the best option.

@iNilo
Copy link

iNilo commented Sep 14, 2016

Is there any info on getting this to work?
$qryserver = new \SteamCondenser\Servers\SourceServer("127.0.0.1",27015);
$qryserver->setLogger($logger);

Does not log a thing ?

@koraktor
Copy link
Owner

@iNilo This code does nothing, effectively. It will just create a server object and set its logger. So there is nothing to log here.

@iNilo
Copy link

iNilo commented Sep 17, 2016

Yes, but how do I get it actually do (log) something ? 😄

@koraktor
Copy link
Owner

Use one of the server methods like getPlayers() or getRules().

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

3 participants