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

#116 monolog update #117

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

Conversation

tanerincode
Copy link

Monologue has made a significant change, it now accepts LogRecords instead of arrays. This PR contains minor changes for the given situation.

  • Other information:
        $config = [
            "group_name" => "my_group_name",
            "stream_name" => "my_stream_name",
            "retention" => 30,
            "sdk" => [
                  'region' => 'eu-east-1',
                  'version' => 'latest',
                  'credentials' => [
                      'key' => getenv('AWS_CLOUDWATCH_KEY'),
                      'secret' => getenv('AWS_CLOUDWATCH_SECRET')
                  ]
            ]
        ];

      $client = new CloudWatchLogsClient($config["sdk"]);

       $handler = new CloudWatch(
            client: $client,
            group: $config["group_name"],
            stream: $config["stream_name"],
            retention: $config["retention"],
            batchSize: 10000,
            tags: [], 
            level: Level::Debug, 
            bubble: true,
            createGroup: false
        );

        $handler->setFormatter(new JsonFormatter());
        $logger = new Logger('here_your_channel_name');
        $logger->pushHandler($handler);

        return $logger;

@vnrmc
Copy link

vnrmc commented Mar 15, 2023

Great job, tanerincode! I hope Maksym finds time to approve it :)

@stefanrakicfaxi
Copy link

@maxbanton please approve this PR if it's okay for you

@ravewill
Copy link

ravewill commented Aug 7, 2023

I'm switching to another CloudWatch logging provider as this is blocking my upgrade to Laravel 10. I'm sure I'm not alone 😞

@SoCooLoveec
Copy link

@maxbanton can you please merge this PR and make new release version?

@jandominikair
Copy link

@maxbanton Please, do you have any update to merge this PR?

@tanerincode
Copy link
Author

@jandominikair i think he is not available for review this pr, someone did this package alternative with this fix, you can find that one in pr's or issues

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.

None yet

7 participants