Getting unnecessary data in Log file

I want to create logfile of what is being writing into output panel only.
However in log files I am also getting activity related information(see screen shot 1). I just want only data which is there in the output panel. Also is possible to create saprate log file for each day this will be much easy for clean up logs which are not needed after certain days

Screenshot 1
image

Here is my setting.json file
{
“wsurl”: “ws://i*****.openiap.io”,
“username”: “yash.shah@i******.in”,
“use_virtual_click”: true,
“use_sendkeys”: false,
“use_postwait”: “00:00:01”,
“use_animate_mouse”: false,
“updatecheckinterval”: “1.00:00:00”,
“unsafepassword”: null,
“thread_lock_timeout_seconds”: 10,
“skip_online_state”: false,
“skip_child_session_check”: false,
“remote_allowed”: true,
“remote_allow_multiple_running_max”: 2,
“remote_allow_multiple_running”: false,
“reloadinterval”: “00:05:00”,
“recording_add_to_designer”: true,
“record_overlay”: true,
“querypagesize”: 50,
“password”: “”,
“otel_trace_url”: “”,
“otel_trace_interval”: 5000,
“otel_metric_url”: “”,
“otel_metric_interval”: 5000,
“openflow_uniqueid”: “9d7de52a537bdaa3a94148e50c2352d1”,
“ocrlanguage”: “eng”,
“noweblogin”: false,
“notify_on_workflow_remote_start”: true,
“notify_on_workflow_remote_end”: false,
“notify_on_workflow_end”: false,
“network_message_timeout”: “00:00:15”,
“move_animation_steps”: 20,
“move_animation_run_time”: “00:00:00.5000000”,
“minimize”: false,
“max_workflows”: 500,
“max_trace_lines”: 250,
“max_projects”: 100,
“max_output_lines”: 250,
“mainwindow_position”: “606, 573, 1918, 1030”,
“log_warning”: false,
“log_verbose”: false,
“log_to_file”: true,
“log_selector_verbose”: false,
“log_selector”: false,
“log_output”: false,
“log_network”: false,
“log_information”: false,
“log_file_level_minimum”: 2,
“log_file_level_maximum”: 2,
“log_error”: false,
“log_debug”: false,
“log_busy_warning”: false,
“log_activity”: false,
“lastupdatecheck”: “2024-04-20T07:30:19.2697764+05:30”,
“jwt”: “A****M”,
“isagent”: false,
“getting_started_url”: “”,
“files_pending_deletion”: ,
“entropy”: “bouxEZI6VexjcI0NyJV0lPMY1uQ=”,
“enable_analytics”: true,
“doupdatecheck”: true,
“disable_instance_store”: false,
“designerlayout”: “”,
“culture”: “”,
“cef_useragent”: “”,
“cancelkey”: “{ESCAPE}”,
“autoupdateupdater”: false,
“properties”: {
“IE_enable_xpath_support”: true,
“NM_wait_for_tab_after_set_value”: false,
“NM_wait_for_tab_click”: false,
“NM_compensate_for_old_addon”: false,
“NM_debug_console_output”: false,
“NM_unique_xpath_ids”: [
“ng-model”,
“ng-reflect-name”,
“data-control-name”
],
“NM_protocol_timeout”: “00:00:10”,
“NM_wait_for_tab_timeout”: “00:00:00.0010000”,
“Office_get_emails_max_folders”: 50,
“Office_get_emails_skip_public”: true,
“Script_csharp_intellisense”: true,
“Script_vb_intellisense”: true,
“Script_use_embedded_python”: true,
“Script_py_create_no_window”: true,
“Windows_allow_attach”: true,
“Windows_cache_timeout”: “00:05:00”,
“Windows_enable_cache”: true,
“Windows_allow_multiple_hits_mid_selector”: false,
“Windows_enum_selector_properties”: false,
“Windows_get_elements_in_different_thread”: true,
“Windows_search_timeout”: “00:00:05”,
“Windows_traverse_selector_both_ways”: true,
“Windows_enable_windows_detector”: true,
“Windows_try_mouse_over_search”: false,
“Windows_search_descendants”: true,
“Windows_create_short_selector”: true,
“SAP_record_with_get_element”: true,
“SAP_bridge_timeout_seconds”: 60,
“SAP_auto_launch_sap_bridge”: true,
“terminalemulator_auto_close”: true,
“avirecorder_enabled”: false
}
}

log files’s in openrpa are meant for tracing ( logging all calls ) not for catching console output.
If you want to catch that, the only solution right now is streaming it, or saving it on workflow instance’s inside openflow

This would be a much easier change though (and tbh something that I was asked by our team as well).
For example for my own testing, I changed the logging target to this:

var logfile = new NLog.Targets.FileTarget("logfile") 
{ 
    FileName = System.IO.Path.Combine(Extensions.ProjectsDirectory, "logs", "logfile_${date:format=yyyy-MM-dd}.txt") 
};

so that it’s in the logs subfolder (easier to track) and automatically rolls over on midnight, as when searching event logs I was hitting earlier days events without realizing (and logfile has time only to save write space, so it’s not that easy to distinguish which day things are from).

Adding separate logging target for Output would be a bigger change, and changing logging levels for other events so they don’t overlap would be a breaking change, so those 2 are less likely/would need more work.

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