-
Notifications
You must be signed in to change notification settings - Fork 787
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
Add option to enable logger and define logger class #395
Conversation
We dont need 2 configuration parameters here.
Different logger: fos_elastica:
clients:
default:
host: localhost
port: 9200
logger: my.logger.service.id Disable logger: fos_elastica:
clients:
default:
host: localhost
port: 9200
logger: false |
Null and true in the logger configuration should be considered to use the default logger service as well. |
Since the |
The thing is everything in the configuration treats null as true - but that can just be handled by the configuration class. |
@merk I have made the requested changes |
Thanks, final request could you please squash the commits? |
I actually tried, but for some reason screwed things up a bit. Will try again |
@merk squashed :) |
if (false !== $logger) { | ||
$clientDef->addMethodCall('setLogger', array(new Reference($logger))); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra closing brace here, or is it for the foreach
and just not indented properly?
I'm not sure where that extra bracket came from |
Add option to enable logger and define logger class
Thanks! |
It seems I would have an error if I dont have the logger option set (I am updating the bundle from previous 3.0 version). I have next error while running
|
Add a documentation related to this change: FriendsOfSymfony#395 (comment)
Add a documentation related to this change: FriendsOfSymfony#395 (comment)
Fixes #118
Add the option to disable the logger and optionally specify the logger class.
The logger is enabled by default, but you can disable it per client by adding the
enable_logger
option:You can also override the logger class by specifying a service id in the
logger_class
option:This might not be the most elegant solution, but I'm open for ideas if somebody has a different implementation.
@todo: documentation