Is there a way to split Execution Log by logging level?


I’m trying to create logging system that separates local Execution log messages to two separate files. The purpose of this that there would be an error log, that collects only “warn”, “fatal” and “error” level level logging from all processes. This would be helpful for motoring and fault diagnostics.

Has anyone tried to create this kind of logging?

in general we can do:

  • read text file - read in the Log file - strText
  • split the lines - strText.split({Environment.NewLine},StringSplitOptions.RemoveEmptyEntries)

then you can filter the lines on the different Levels as you want to include - arrLinesFiltered

Finaly write the result out to a new file with write text file -
String.Join(Environment.NewLine, arrLinesFiltered)

Yes, it coulde be done this way. But this method requires new automation process (or implementation to existing process).

I’m trying to figure out a way to utilize the Nlog system that Uipath (uirobot) uses. First issue have is that the Nlog.config file keeps resetting. I changed the directory and it was working fine, but after some days it was back to orginal. And the second one is that adding new target won’t create new log file. (Nlog.config content in picture)