Skip to content

Conversation

@Spea
Copy link

@Spea Spea commented Apr 26, 2012

This PR adds the possibility to configure the publisher for the gelf handler directly (as discussed in #6).

The following examples are valid configurations.

monolog:
    handlers:
        gelf:
            type: gelf
            publisher:
                hostname: localhost # required
                port: 12201 # optional
                chunk_size: 1420 # optional

You can optionally define a service id so you can use the publisher wherever you want.

monolog:
    handlers:
        gelf:
            type: gelf
            publisher:
                id: my.publisher.id
                hostname: localhost # required
                port: 12201 # optional
                chunk_size: 1420 # optional

However, it is still possible to use your own defined publisher service.

monolog:
    handlers:
        gelf:
            type: gelf
            publisher: my.publisher.service_id

# or

monolog:
    handlers:
        gelf:
            type: gelf
            publisher:
                id: my.publisher.service_id

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message is wrong. What must be set is either the hostname or the id

@Spea
Copy link
Author

Spea commented Apr 27, 2012

Fixed it :)

@Seldaek
Copy link
Member

Seldaek commented Apr 27, 2012

Looks fine to me now. Thanks!

Seldaek added a commit that referenced this pull request Apr 27, 2012
Added possibility to directly configure the gelf publisher
@Seldaek Seldaek merged commit 85a4eb4 into symfony:master Apr 27, 2012
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.

3 participants