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

Added a new option to the config object so $created_config can be passed through to underlying CloudWatch package #38

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

throttlehead-dev
Copy link

@throttlehead-dev throttlehead-dev commented Jan 6, 2023

Closes #36

This is a small update that passes through a new created_config option to the underlying logger.

Best practices are to setup logging groups and permissions for them and only give your web service permission to these specific group names and/or prefixes. Since our groups were already created in our infra code, we would get an error when trying to log to them because it would always try to create the group and not have permission to do any of the operations required for checking and creating log groups.

This simply allows you to set this to false in the config and ensure the underlying package doesn't try to do any of this stuff.

@danishn
Copy link

danishn commented Sep 21, 2023

With #42 which was merged around 3 weeks ago has shifted from using Maxbanton\Cwh\Handler\Cloudwatch to PhpNexus\Cwh\Handler\Cloudwatch package.

This PR might need amendments to support PhpNexus package which also supports an additional param $creatStream to further reduce API calls to AWS in case LogGroup and LogStream both already exist - reference docs

An update to this PR would definitely help.
Thanks in advance! :)

@throttlehead-dev
Copy link
Author

throttlehead-dev commented Sep 21, 2023 via email

@throttlehead-dev throttlehead-dev changed the title Dev/add create group opt Added a new option to the config object so $created_config can be passed through to underlying CloudWatch package Sep 21, 2023
@throttlehead-dev
Copy link
Author

throttlehead-dev commented Sep 21, 2023

I wanted to note here that this does appear to be a breaking change for people who are < laravel 10. You guys have phpnexus/cwh": "^1.1.14 || ^2.0 || ^3.0.0", in the composer here.

The problem is that if it has to resolve to an older version, it actually resolves to a version of the code that still has the Maxbanton/Cwh namespace.

If I try to force 3.0 in our project, I get a conflict with monolog 3.0:

    - monolog/monolog 2.0.0-beta1 requires php ^7.1 -> your php version (8.1.23) does not satisfy that requirement.
    - monolog/monolog[2.0.0-beta2, 2.0.0, 2.0.1, 2.0.2] require php ^7.2 -> your php version (8.1.23) does not satisfy that requirement.
    - laravel/framework[v9.0.0-beta.1, v9.0.0-beta.2, v9.0.0-beta.3, v9.0.0-beta.4, v9.0.0-beta.5, v9.0.0, v9.0.1, v9.0.2, v9.1.0, v9.2.0, v9.3.0, v9.3.1, v9.4.0, v9.4.1, v9.5.0, v9.5.1, v9.6.0, v9.7.0, v9.8.0, v9.8.1, v9.9.0, v9.10.0, v9.10.1, v9.11.0, v9.12.0, v9.12.1, v9.12.2, v9.13.0, v9.14.0, v9.14.1, v9.15.0, v9.16.0, v9.17.0, v9.18.0, v9.19.0, v9.20.0, v9.21.0, v9.21.1, v9.21.2, v9.21.3, v9.21.4, v9.21.5, v9.21.6, v9.22.0, v9.22.1, v9.23.0, v9.24.0, v9.25.0, v9.25.1, v9.26.0, v9.26.1, v9.27.0, v9.28.0, v9.29.0, v9.30.0, v9.30.1, v9.31.0, v9.32.0, v9.33.0, v9.34.0, v9.35.0, v9.35.1, v9.36.0, v9.36.1, v9.36.2, v9.36.3, v9.36.4, v9.37.0, v9.38.0, v9.39.0, v9.40.0, v9.40.1, v9.41.0, v9.42.0, v9.42.1, v9.42.2, v9.43.0, v9.44.0, v9.45.0, v9.45.1, v9.46.0, v9.47.0, v9.48.0, v9.49.0, v9.50.0, v9.50.1, v9.50.2, v9.51.0, v9.52.0, v9.52.1, v9.52.2, v9.52.3, v9.52.4, v9.52.5, v9.52.6, v9.52.7, v9.52.8, v9.52.9, v9.52.10, v9.52.11, v9.52.12, v9.52.13, v9.52.14, v9.52.15, 9.x-dev] require monolog/monolog ^2.0 -> satisfiable by monolog/monolog[2.0.0-beta1, 2.0.0-beta2, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.x-dev].
    - You can only install one version of a package, so only one of these can be installed: monolog/monolog[dev-main, 1.17.0, 1.17.1, 1.17.2, 1.18.0, 1.18.1, 1.18.2, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.22.1, 1.23.0, 1.24.0, 1.25.0, 1.25.1, 1.25.2, 1.25.3, 1.25.4, 1.25.5, 1.26.0, 1.26.1, 1.27.0, 1.27.1, 1.x-dev, 2.0.0-beta1, 2.0.0-beta2, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.x-dev].
    - monolog/monolog 3.x-dev is an alias of monolog/monolog dev-main and thus requires it to be installed too.
    - phpnexus/cwh[v3.0.0-RC1, v3.0.0, v3.1.0] require monolog/monolog ^3.0 -> satisfiable by monolog/monolog[3.0.0-RC1, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.3.1, 3.4.0, 3.x-dev (alias of dev-main)].
    - Root composer.json requires phpnexus/cwh ^3.0.0 -> satisfiable by phpnexus/cwh[v3.0.0-RC1, v3.0.0, v3.1.0].
    - Root composer.json requires laravel/framework ^9.0 -> satisfiable by laravel/framework[v9.0.0-beta.1, v9.0.0-beta.2, v9.0.0-beta.3, v9.0.0-beta.4, v9.0.0-beta.5, v9.0.0, v9.0.1, v9.0.2, v9.1.0, v9.2.0, v9.3.0, v9.3.1, v9.4.0, v9.4.1, v9.5.0, v9.5.1, v9.6.0, v9.7.0, v9.8.0, v9.8.1, v9.9.0, v9.10.0, v9.10.1, v9.11.0, v9.12.0, v9.12.1, v9.12.2, v9.13.0, v9.14.0, v9.14.1, v9.15.0, v9.16.0, v9.17.0, v9.18.0, v9.19.0, v9.20.0, v9.21.0, v9.21.1, v9.21.2, v9.21.3, v9.21.4, v9.21.5, v9.21.6, v9.22.0, v9.22.1, v9.23.0, v9.24.0, v9.25.0, v9.25.1, v9.26.0, v9.26.1, v9.27.0, v9.28.0, v9.29.0, v9.30.0, v9.30.1, v9.31.0, v9.32.0, v9.33.0, v9.34.0, v9.35.0, v9.35.1, v9.36.0, v9.36.1, v9.36.2, v9.36.3, v9.36.4, v9.37.0, v9.38.0, v9.39.0, v9.40.0, v9.40.1, v9.41.0, v9.42.0, v9.42.1, v9.42.2, v9.43.0, v9.44.0, v9.45.0, v9.45.1, v9.46.0, v9.47.0, v9.48.0, v9.49.0, v9.50.0, v9.50.1, v9.50.2, v9.51.0, v9.52.0, v9.52.1, v9.52.2, v9.52.3, v9.52.4, v9.52.5, v9.52.6, v9.52.7, v9.52.8, v9.52.9, v9.52.10, v9.52.11, v9.52.12, v9.52.13, v9.52.14, v9.52.15, 9.x-dev].

I wont really be able to test the changes in our project, nor upgrade to them, so we'll have to limp along with our fork for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add config option for $createGroup
2 participants