It looks like on Viya you can use FILENAME to point to a Azure Blob Storage, so that might make it possible to create the fileref then just use PROC PRINTTO:
https://documentation.sas.com/doc/en/pgmsascdc/v_035/lestmtsglobal/p1arsjiowdszd8n1qk8mqg5p2uhv.htm
But unless there is something similar for Oracle (I doubt it), agree with suggestion to separate the process of writing the log from whatever process can upload it to the blob
Of course even if you use a non-SAS process to upload to the blob, you should still be able to call it from your SAS job (assuming XCMD is enabled), so that it is fully automated.
The Boston Area SAS Users Group (BASUG) is hosting our
in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at
https://www.basug.org/events.