Export output logs automaticly

hi guys, im trying to export the logs on the output panel to a certain folder everytime the execution ends or encouters an error
image
image
i dont want to use the logs in the C:\Users\user_name\AppData\Local\UiPath\Logs because it’s hard to understand.

how can i achieve this ?

@RobertoEwaldo

you can click at yellow highlight to export log message in output panel

image

@Natapong yeah i know, but i want to export it automatically everytime the execution ends or encounters an error, how can i do that ?

1 Like

@RobertoEwaldo

You can edit NLog.config file to custom your Execution.log to export log messaeg from output panel *If you want log info please delete comment at line 6

then you will got log file like this


Image from my output panel
image

NLog.Config file located in UiPath installation folder

You can refer below

I hope it would be help you

1 Like

@Natapong Thanks, will try it

@Natapong hi is there any way i can get only the message ? Because it doesn’t look so pretty here
image

@RobertoEwaldo

You can use regex to control log messages output.

Solution:
1.Add variable for get only first message

<variable name="truncated_message" value="${replace:replaceWith=...:regex=true:inner=${message}:searchFor=(\,.*$)}"/>

2.Add new variable to log layout

layout="${time}${level}${truncated_message}

You will get log like this

I hope this information will be useful to you

1 Like

@Natapong Thanks a lot bro it worked

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.