Accessing the logs from within a process

Is it possible to access the logs for the current process from inside the process itself? We want to get all logged messages up to the current point and send them to an external application.

You could get them from the Orchestrator database Logs table.