Hi Lee, RGWDebugLog logs at the debug level. Do you have the correct logging levels on your rados gateways? Should be 20. Cheers, Tom On Mon, 8 Apr 2024 at 23:31, <soyoon.lee@xxxxxxxxxxx> wrote: > Hello, I wrote a Lua script in order to retrieve RGW logs such as bucket > name, bucket owner, etc. > However, when I apply a lua script I wrote using the below command, I do > not see any logs start with Lua: INFO > > radosgw-admin script put --infile=/usr/tmp/testPreRequest.lua > --context=postrequest > > <my lua script> > function print_bucket_log(bucket) > RGWDebugLog(" Name: " .. bucket.Name) > end > > if Request.Bucket then > RGWDebugLog("bucket operation logs: ") > print_bucket_log(Request.Bucket) > end > > > According to the official document regarding Lua Scripting, > The RGWDebugLog() function accepts a string and prints it to the debug log > with priority 20. Each log message is prefixed Lua INFO:. This function has > no return value. > even though I set debug_rgw = 20, I do not see any logs. > > However, if when I apply the below lua script with bucket.Id, I am getting > Lua: ERROR like below: > Lua ERROR: [string "function print_bucket_log(bucket)..."]:3: attempt to > concatenate a nil value (field 'Id') > > <my lua script> > function print_bucket_log(bucket) > RGWDebugLog(" Name: " .. bucket.Name) > RGWDebugLog(" Id: " .. bucket.Id) > end > > if Request.Bucket then > RGWDebugLog("bucket operation logs: ") > print_bucket_log(Request.Bucket) > end > > > Any help would be very appreciated! > _______________________________________________ > ceph-users mailing list -- ceph-users@xxxxxxx > To unsubscribe send an email to ceph-users-leave@xxxxxxx > _______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx