Bucket Access logpush

Hi I would like to ask a question. I have a backend in cloudflare so created Worker, and no domain. And created bucket together with logpush enabled (paid version) And I see logs if enable the realtime log stream, however I want the logs to be pushed to bucket automaticaly or atleast have an access to them. All documentation did not help, all suggestions tried not working, Is it possible to logs to be put in Bucket? because from what I was reading it should be done in AWS S3 Management Console or Google Cloud Console. Tell please what additional information you need. Thank you very much!
6 Replies
Chaika
Chaika11mo ago
You can just create a logpush job for Worker Trace Events and select R2 as a destination, (Account level -> Logs -> Add Logpush job or https://dash.cloudflare.com/?to=/:account/logs/new). There's no built in way to read back the logs easily at the moment (other then opening and decompressing the log files individually by hand), although they are working on Logs Engine to do that at some point
robertjames247
robertjames24711mo ago
@chaika.me ok thanks, what to choose R2 Object Storage or S3-Compatible?
Chaika
Chaika11mo ago
You want to use an R2 Bucket right? If so, pick r2
robertjames247
robertjames24711mo ago
last question please, R2 Access Key ID A unique access key id for your service. R2 Secret Access Key The private secret access key for your service I mean i see r2 api token but where to find the keys? Oh I see key id is just account id correct? but where is secret key?
Chaika
Chaika11mo ago
go to R2 -> manage r2 api tokens -> create new, it'll give you both, just make sure to give it edit access
robertjames247
robertjames24711mo ago
Thanks bro problem solved!