Using Julia Logging with Multiple Julia Scripts


I currently have a situation where I have one Julia script that calls other Julia functions via the “run” command, and I am trying to find a way to use Julia logging (provided by the ‘Logging’ package) throughout all the Julia scripts. Ulitmately, I want to process all of the logs and take specific action based on the log level in the main Julia script.

I know that I can have the sub-Julia scripts print their logs to a text file, and I’ve also managed to pipe the log printouts from stdout and stderr to my main Julia script, but both of these methods don’t preserve log level so I can’t filter/process the logs in the main script.

Is there a way I can pass the logs from one script to another while preserving the log levels? If not is there a better method to process logs from multiple Julia scripts?

Any help would be greatly appreciated!

I’m not sure why you have multiple different scripts, but can’t you just have one master script that includes the others?

1 Like