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

Add support to log to redis #292

Closed
wants to merge 44 commits into from

Commits on Dec 7, 2017

  1. Add stream handler lock option

    mRoca committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    00ed2f3 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2018

  1. Configuration menu
    Copy the full SHA
    9f6f0b6 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2018

  1. Configuration menu
    Copy the full SHA
    86fd51e View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2018

  1. add support for redis

    Ruud Van den Dungen committed Oct 15, 2018
    Configuration menu
    Copy the full SHA
    a3790d9 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2018

  1. Configuration menu
    Copy the full SHA
    7fdda67 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2019

  1. Merge branch 'master' of https://github.com/symfony/monolog-bundle

    Ruud Van den Dungen committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    d24abd1 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2019

  1. Remove duplicate entry

    B-Galati committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    24291fb View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2019

  1. minor symfony#293 Remove duplicate entry (B-Galati)

    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Remove duplicate entry
    
    Commits
    -------
    
    24291fb Remove duplicate entry
    lyrixx committed Jan 31, 2019
    Configuration menu
    Copy the full SHA
    523768f View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2019

  1. Configuration menu
    Copy the full SHA
    cc9abf6 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2019

  1. feature symfony#297 Expose configuration for the ConsoleHandler (lyrixx)

    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Expose configuration for the ConsoleHandler
    
    Like that we will be able to use this configuration (for example):
    ```yaml
            console:
                type: console
                process_psr_3_messages: false
                channels: ["!event", "!doctrine", "!console"]
                console_formater_options:
                    format: "%%datetime%% %%start_tag%%%%level_name%%%%end_tag%% <comment>[%%channel%%]</> %%message%%%%context%%\n"
                    multiline: false
    ```
    
    see also symfony/symfony#30345
    
    Commits
    -------
    
    cc9abf6 Expose configuration for the ConsoleHandler
    lyrixx committed Mar 12, 2019
    Configuration menu
    Copy the full SHA
    005aefb View commit details
    Browse the repository at this point in the history

Commits on May 2, 2019

  1. Fix typo in PhpDoc

    jdreesen committed May 2, 2019
    Configuration menu
    Copy the full SHA
    981d74f View commit details
    Browse the repository at this point in the history

Commits on May 16, 2019

  1. feature symfony#285 Register processors for autoconfiguration (nicola…

    …s-grekas)
    
    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Register processors for autoconfiguration
    
    Replaces symfony/symfony#27801 (which has been reverted meanwhile)
    Leverages Seldaek/monolog#1204
    Already documented in symfony/symfony-docs#9996 (but doc needs update)
    
    Commits
    -------
    
    7fdda67 Register processors for autoconfiguration
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    969e476 View commit details
    Browse the repository at this point in the history
  2. minor symfony#301 Fix typo in PhpDoc (jdreesen)

    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Fix typo in PhpDoc
    
    As the `DeduplicationHandler` extends the `BufferHandler` I think the wording for the `handler` parameter should be the same.
    
    Commits
    -------
    
    981d74f Fix typo in PhpDoc
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    962a2e1 View commit details
    Browse the repository at this point in the history
  3. Flush loggers on kernel.reset

    dnna authored and lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    366f692 View commit details
    Browse the repository at this point in the history
  4. feature symfony#279 Flush loggers on kernel.reset (dnna)

    This PR was squashed before being merged into the 3.x-dev branch (closes symfony#279).
    
    Discussion
    ----------
    
    Flush loggers on kernel.reset
    
    Fixes php-pm/php-pm-httpkernel#134 and php-pm/php-pm-httpkernel#62
    
    When using [PHP-PM](https://github.com/php-pm/php-pm) the worker does not die at the end of the request, so the shutdown functions registered by monolog are never triggered (so for example `BufferHandler` never flushes). This PR partially fixes the problem by flushing the loggers containing a `flush` function at the end of each request.
    
    I did not use the `close` function (mentioned in Seldaek/monolog#1053) because some loggers use sockets or other connections that would be closed in this case and not be reusable in the next request.
    
    I'm not sure if this is the best solution to this problem, happy to discuss alternatives if there is a better way.
    
    Commits
    -------
    
    366f692 Flush loggers on kernel.reset
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    6684794 View commit details
    Browse the repository at this point in the history
  5. Fixed CS and CHANGELOG

    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    a7c1046 View commit details
    Browse the repository at this point in the history
  6. Deprecrate "excluded_404s" option

    geoffrey-brier authored and lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    f6c8593 View commit details
    Browse the repository at this point in the history
  7. feature symfony#302 Deprecate "excluded_404s" option (geoffrey-brier)

    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Deprecate "excluded_404s" option
    
    replaces symfony#275
    fixed symfony/symfony#26969
    
    I have fixed confliects + CS + updated the CHANGELOG
    
    Commits
    -------
    
    f6c8593 Deprecrate "excluded_404s" option
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    d810fcc View commit details
    Browse the repository at this point in the history
  8. Fixed PHPUnit Warning

    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    9f8e531 View commit details
    Browse the repository at this point in the history
  9. feature symfony#270 Support environment option for raven client (Taluu)

    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Support environment option for raven client
    
    In sentry 9, we can filter logs thourgh environments. This PR allows to support this option.
    
    Commits
    -------
    
    86fd51e Support environment option for raven client
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    c720aab View commit details
    Browse the repository at this point in the history
  10. feature symfony#267 Allow setting "ident" parameter for SyslogUdpHand…

    …ler, affects symfony#266 (dhirtzbruch)
    
    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Allow setting "ident" parameter for SyslogUdpHandler, affects symfony#266
    
    As outlined in ticket symfony#266:
    
    The SyslogUdpHandler constructor has a sixth parameter "ident", defaulting to "php".
    However, the current Monolog Bundle implementation allows setting only the first five. Which defaults to the "ident" being set to "php".
    In our case, we are using papertrail as a log backend, and use the same webserver for multiple small projects. In papertrail, that results in the following output:
    
    ```
    May 05 02:16:30 vagrant php:  app.ERROR: fooo {"exception":"[object] (Exception(code: 0): fooo at /var/customers/webs/fastbolt/https/env1.fastbolt.com/src/Pricecalc/UserBundle/Controller/SecurityController.php:36)","username":"anon.","uri":"http://env1.dev.local/login","level":"critical"} []
    May 05 02:18:32 vagrant php:  app.ERROR: fooo {"exception":"[object] (Exception(code: 0): fooo at /var/customers/webs/fastbolt/https/env2.fastbolt.com/src/Pricecalc/UserBundle/Controller/SecurityController.php:36)","username":"anon.","uri":"http://env2.dev.local/login","level":"critical"} []
    ```
    
    The "php" after "vagrant" is the ident configuration. As you can see, we are not able to determine the source environment, other than guessing from filepath or uri.
    However, for filtering using the API, we`d like to be able to change the ident per configuration.
    
    ```
    monolog:
        handlers:
            syslog:
                type: syslogudp
                host: example.com
                port: 514
                level: error
                ident: env1
    ```
    
    Using that config, we should be able to achieve the following log:
    
    ```
    May 05 02:16:30 vagrant env1:  app.ERROR: fooo {"exception":"[object] (Exception(code: 0): fooo at /var/customers/webs/fastbolt/https/env1.fastbolt.com/src/Pricecalc/UserBundle/Controller/SecurityController.php:36)","username":"anon.","uri":"http://env1.dev.local/login","level":"critical"} []
    May 05 02:18:32 vagrant env2:  app.ERROR: fooo {"exception":"[object] (Exception(code: 0): fooo at /var/customers/webs/fastbolt/https/env2.fastbolt.com/src/Pricecalc/UserBundle/Controller/SecurityController.php:36)","username":"anon.","uri":"http://env2.dev.local/login","level":"critical"} []
    ```
    
    Please let me know if there is anything else I should do, as that`s my first PR/issue here.
    
    Commits
    -------
    
    9f6f0b6 Allow setting "ident" parameter for SyslogUdpHandler, affects symfony#266
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    b97e237 View commit details
    Browse the repository at this point in the history
  11. feature symfony#303 Fixed PHPUnit Warning (lyrixx)

    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Fixed PHPUnit Warning
    
    Commits
    -------
    
    9f8e531 Fixed PHPUnit Warning
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    a6c3267 View commit details
    Browse the repository at this point in the history
  12. feature symfony#242 Add stream handler lock option (mRoca)

    This PR was merged into the 3.x-dev branch.
    
    Discussion
    ----------
    
    Add stream handler lock option
    
    This PR adds the $useLocking StreamHandler argument : https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/StreamHandler.php#L44
    
    Commits
    -------
    
    00ed2f3 Add stream handler lock option
    lyrixx committed May 16, 2019
    Configuration menu
    Copy the full SHA
    036cd4b View commit details
    Browse the repository at this point in the history

Commits on May 28, 2019

  1. add better explanation of wat an id is

    Ruud Van den Dungen committed May 28, 2019
    Configuration menu
    Copy the full SHA
    2e0714e View commit details
    Browse the repository at this point in the history
  2. fix handler key not correct

    Ruud Van den Dungen committed May 28, 2019
    Configuration menu
    Copy the full SHA
    100cfde View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2019

  1. add support for redis

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    a143416 View commit details
    Browse the repository at this point in the history
  2. add better explanation of wat an id is

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    f07d51b View commit details
    Browse the repository at this point in the history
  3. fix handler key not correct

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    9c992e1 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'add-redis-config-support' of https://github.com/ruudvdd…

    …/monolog-bundle into add-redis-config-support
    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    efc4265 View commit details
    Browse the repository at this point in the history
  5. fix exception messages when a certain redis class does not exist

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    b43daff View commit details
    Browse the repository at this point in the history
  6. add changelog rule

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    7a1dcab View commit details
    Browse the repository at this point in the history
  7. add enter between types

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    56709bc View commit details
    Browse the repository at this point in the history
  8. change back type and fix configuration

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    e2fc27d View commit details
    Browse the repository at this point in the history
  9. add support for redis

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    5448621 View commit details
    Browse the repository at this point in the history
  10. add better explanation of wat an id is

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    4a01df8 View commit details
    Browse the repository at this point in the history
  11. fix handler key not correct

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    eabdb9c View commit details
    Browse the repository at this point in the history
  12. add support for redis

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    ad6b37f View commit details
    Browse the repository at this point in the history
  13. add better explanation of wat an id is

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    e23d1ff View commit details
    Browse the repository at this point in the history
  14. fix handler key not correct

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    d1ca48b View commit details
    Browse the repository at this point in the history
  15. fix exception messages when a certain redis class does not exist

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    2e09bfd View commit details
    Browse the repository at this point in the history
  16. add changelog rule

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    5d8ee96 View commit details
    Browse the repository at this point in the history
  17. add enter between types

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    ec0dc0c View commit details
    Browse the repository at this point in the history
  18. change back type and fix configuration

    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    7a012af View commit details
    Browse the repository at this point in the history
  19. Merge branch 'add-redis-config-support' of https://github.com/ruudvdd…

    …/monolog-bundle into add-redis-config-support
    Ruud Van den Dungen committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    dee6679 View commit details
    Browse the repository at this point in the history