output log for RDS stored procedure

1

Hi Team,

I have an RDS MySQL DB (one aurora serverless and one is normal MYSQL RDS), I created a stored procedure in my DB in which I do some logs outputs :

log("begin of my procedure")

.....

log("bla bla bla....")

....

log("End of my procedure")

where can I find the output log after my stored procedure is successfully finished?

in RDS console => logs & event; is empty no log there

in the DB cluster parameter group I enabled : slow_log, server_audit_logging, general_log

I see some logs in cloud watch but not my custom logs " "begin of my procedure", "End of my procedure"

also in RDS console => logs & event section I only see events, no logs generated

any ideas please to see my custom logs printed by my stored procedure in CWL or in rds logs & event? thanks a lot

1 Answer
0

Hi,

The standard logging mechanisms: general/slow/audit logs do not capture query results. Since RDS/Aurora do not provide access to the host, it would not be possible to access files that are written locally, so you will need to write to a file externally to a service like S3, for example.

AWS
Shiv
answered 2 years ago
  • Hi, thank you for your answer, in fact, I call my stored procedure from my was glue pyspark job not from a local machine. Is there a way to capture the result of the execution of my stored procedure from within the glue job? because the issue I'm facing now is that my glue job after loading => call the stored procedure => the stored procedure fail but the glue job is marked as succeeded.

    I'm looking at how to know from within my glue job whether or not the stored procedure runs successfully so that I can pass or fail the job.

    to avoid the scenario when the stored procedure fails but the job itself is marked as succeeded. Thank you

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions