Skip to content

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.

7 participants