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

Feature Request: AppenderAWSCloudWatchLog #9

Open
DyfanJones opened this issue Sep 22, 2023 · 2 comments
Open

Feature Request: AppenderAWSCloudWatchLog #9

DyfanJones opened this issue Sep 22, 2023 · 2 comments

Comments

@DyfanJones
Copy link

A similar idea to #2, however using AWS CloudWatch logs. To achieve this I use paws to make the connection with AWS.

I have got an initial version of this on my folk: https://github.com/DyfanJones/lgrExtra/tree/aws_cloudwatch

remotes::install_github("dyfanjones/lgrExtra")
library(lgrExtra)

app <- AppenderAWSCloudWatchLog$new(log_group_name = "lgrExtra")
lg <- lgr::get_logger("lgrExtra")$add_appender(app)$set_propagate(FALSE)
lg$info("Foo")
lg$warn("Bar")
lg$error("cho")


> app$log_group_name
[1] "lgrExtra"
> app$log_stream_name
[1] "lgrExtra/2023-09-22/bm6qnrzt"
> app$data
[[1]]
[1] "INFO : Foo"

[[2]]
[1] "WARN : Bar"

[[3]]
[1] "ERROR: cho"

image

Let me know if your interested in adding this feature. I haven't added any unit tests as of yet, but happy to work on this.

@s-fleck
Copy link
Owner

s-fleck commented Sep 24, 2023

Thank you! I'll look at it. Sadly i don't have much time for my private projects in the last year or so but i'll see if i can get it merged ;)

@DyfanJones
Copy link
Author

Cool, I will tidy up the code and raise a PR :)

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

No branches or pull requests

2 participants