I have two PHP scripts. The first script (e.g. local.php) executes the second one (e.g. remote.php) via SSH using the phpseclib. Both scripts are using Monolog to write logs to the console.
Now my problem: How can I filter the log entries from the script executed via SSH in the local.php script?
For example: I only want to see errors and warnings, but the remote script always sends all entries (as other handlers in the local.php script might require a higher log level). So the local.php script must parse the log output of the remote.php script and assign the entries to Monolog records.