Hi,
The only possible way is by using Log Ingestion API. I would suggest to try first the tutorial on your local machine to understand how it works and after that proceed to implementing it in your pipelines. This if for Log Analytics. Application Insights also have a feature for custom logs: Application Insights API for custom events and metrics.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.