Introduction
During process execution, a message (Log) for each step along the way is generated. These are gathered and stored in a Log File. The overall operation of gathering and storing Logs is called Logging.
This document will present to you the concept of logging levels and how to make the most use of logs.
Logs
Logs in akaBot can be categorized into 2 groups:
- Default logs: These logs are auto generated for certain event, such as when the execution start/ end, or when the execution encounters error/ exception and stop.
- User defined logs: These logs are generated by RPA Developer when using the activity Log Message or WriteLine.
In akaBot Studio, we can view the loggings in Output panel:
Logging levels
Logging levels tell how important a log message is related to the execution of a process. Here are the logging levels user can define using activity Log Message:
Logging Level | Meaning |
Fatal | The robot cannot or should not recover from this error. Something has gone critically wrong and the process needs to be stopped. |
Error | An error occurred. The robot will attempt to recover and move on with the next item. Please refer to error code table for more details. |
Warn | Any important data that we need to stand out from the rest of the log information. |
Info | Information about robot progress. Usually includes when we enter/exit a workflow, when data is read from an external source, etc. |
Trace | Information useful while developing/debugging, however not useful and needed in production. |
By default, we can view the logs down to Info level; that means, only the logs with Info level and higher (Warn, Error...) can be seen in Output panel. To change how details the logs showed:
- Open akaBot Agent, choose Setting button
- In Setting screen, select Center tab and change the Logging level:
How details the logs are showed:
Logging Level | Default Logs | User-Defined Logs (using Log Message activity) |
---|---|---|
Off | None | None |
Fatal | All messages logged with Fatal level or higher. | All messages logged with Fatal level or higher. |
Error | All messages logged with Error level or higher. | All messages logged with Error level or higher. |
Warn | All messages logged with Warn or higher. | All messages logged with Warn or higher. |
Info | All messages logged with Info or higher. | All messages logged with Info or higher. |
Debug | All messages logged with Debug level or higher. | Cannot be set by hand. |
Verbose | All messages logged with Verbose level or higher. | All messages logged with Trace level or higher. |
Logs location
User logs
Until now, all the logs we have learned about related to akaBot Studio, which are generated after we run a process. These are defined as User logs, since we user "create" them, for example by hitting Start button in akaBot Studio. These logs are show in Output panel, but we can access them as file .txt later. Here are several ways to find the folder location:
- Open File Explorer, go to %localappdata%\akaBot\Logs\
- In akaBot Agent, choose Setting button. In Setting screen, select Misc tab and choose the Open folder button for Current user logs.
- In akaBot Studio, send the combination of Ctrl+L; or click on the button Open Logs on the Menu panel.
Here are the explanation for files in this folder:
File name/format | Meaning |
log4net.db log4net.db-shm log4net.db-wal | These files which are needed for store the application logs and push to the akaBot Center. File is stored in sqlite3 format. |
yyyy-mm-dd_BotService.log | This file contains application log of akaBot Agent service. Each configured user bot will have an instance of service. |
yyyy-mm-dd_BotAgent.log | This file contains application log of akaBot Agent UI |
yyyy-mm-dd_BotExecutor.log | This file contains application log of akaBot Agent executor |
yyyy-mm-dd_Studio.log | This file contains application log of akaBot Studio |
yyyy-mm-dd_hhmmss_Agent_<projectName>.log | This file contains workflow logs that was run by akaBot Agent |
yyyy-mm-dd_hhmmss_Studio_<projectName>.log | This file contains workflow logs that was run by akaBot Studio |
Machine logs
Definition: Updating
We can find these logs by:
- Open File Explorer, go to %programdata%\akaBot\Logs\
- In akaBot Agent, choose Setting button. In Setting screen, select Misc tab and choose the Open folder button for Machine logs.
Here are the explanation for files in this folder:
File name/format | Meaning |
log4net.db log4net.db-shm log4net.db-wal | These files which are needed for store the application logs and push to the akaBot Center. File is stored in sqlite3 format. |
yyyy-mm-dd_BotService.log | This file contains application log of akaBot Agent service. |
yyyy-mm-dd_msiexec.log | This file contains akaBot installation logs. |
yyyy-mm-dd_AutoLogonChecker.log | This file contains application logs of Auto Logon Checker module. |
Error Codes
The following list describes system error codes. They are returned by the GetLastError function when many functions fail. To retrieve the description text for the error in your application, use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag.
Error name | Code |
---|---|
ERROR | -1 |
SUCCESS | 0 |
ERROR_APPDATA_PATH_NOT_EXIST | 100 |
ERROR_ILLEGAL_FILE | 101 |
ERROR_INVALID_ARGS | 102 |
ERROR_INVALID_ENV | 103 |
ERROR_LOAD_PLUGINS | 104 |
ERROR_READ_XAML_FAILED | 105 |
ERROR_WORKFLOW_ABORTED | 106 |
ERROR_WORKFLOW_CANCELLED | 107 |
ERROR_WORKFLOW_EXCEPTION | 108 |
ERROR_WORKFLOW_FAULTED | 109 |
ERROR_SETTING_NOT_FOUND | 110 |
ERROR_LICENSE_ERROR | 111 |
ERROR_INSTANCE_NOT_INITIALIZED | 200 |
ERROR_PROXY_SETTING_NOT_VALID | 201 |
ERROR_CONNECT_TO_SERVER_TIMEOUT | 202 |
ERROR_REQUEST_TO_SERVER_FAILED | 204 |
ERROR_AUTHENTICATION_FAILED | 205 |
ERROR_HTTP_ABORTED | 206 |
ERROR_HTTP_ERROR | 207 |
ERROR_HTTP_TIMEOUT | 208 |
ERROR_SERVER_RETURN_INVALID_TOKEN | 209 |
ERROR_UNKNOWN_EXCEPTION | 211 |
ERROR_UNHANDLED_EXCEPTION | 212 |
ERROR_WCF_REQUEST_FAILED | 213 |
ERROR_SERVER_CANNOT_BE_REACHED | 214 |
ERROR_NOT_AUTHENTICATED_TO_SERVER | 215 |
ERROR_USERNAME_CANNOT_NULL_EMPTY | 216 |
ERROR_PASSWORD_CANNOT_NULL_EMPTY | 217 |
ERROR_USERNAME_PASSWORD_CANNOT_NULL_EMPTY | 218 |
ERROR_SESSION_FOR_USERNAME_ALREADY_EXIST | 219 |
ERROR_SESSION_OF_USERNAME_NOT_EXIST | 220 |
ERROR_SETTING_FOR_USER_NOT_FOUND | 221 |
ERROR_TIMEOUT_MUST_GREATER_THAN_ZERO | 222 |
ERROR_LOAD_SETTING_FILE_FAILED | 223 |
ERROR_HTTP_FORBIDDEN | 224 |
ERROR_HTTP_UNAUTHORIZED | 225 |
ERROR_SET_LOG_LEVEL_FAILED | 226 |
ERROR_SET_BOT_CONFIG_FAILED | 227 |
ERROR_ALREADY_CONNECT_TO_SERVER | 228 |
ERROR_ARGUMENT_CANNOT_BE_NULL | 229 |
ERROR_AGENT_IS_BUSY | 230 |
ERROR_TASK_ALREADY_EXECUTED | 231 |
ERROR_TASK_COMMAND_INVALID | 232 |
ERROR_TASK_STATE_INVALID | 233 |
ERROR_SERVICE_NOT_INSTALLED | 234 |
ERROR_SERVICE_NOT_RUNNING | 235 |
ERROR_INVALID_LOG_OBJECT_FORMAT | 236 |
ERROR_INVALID_APPDATA_PATH | 237 |
ERROR_INVALID_PROGRAMDATA_PATH | 238 |
ERROR_PROGRAMDATA_PATH_NOT_EXIST | 239 |
ERROR_CENTER_SETTING_CANNOT_BE_NULL | 240 |
ERROR_PROXY_SETTING_CANNOT_BE_NULL | 241 |
ERROR_MACHINE_NAME_IS_EMPTY | 242 |
ERROR_INVALID_AGENT_KEY | 243 |
ERROR_INVALID_CENTER_URL | 244 |
ERROR_INVALID_PROXY_PORT | 245 |
ERROR_INVALID_USERNAME | 246 |
ERROR_INVALID_PASSWORD | 247 |
ERROR_INVALID_PROXY_URL | 248 |
ERROR_GET_SERVICE_PORT_FAILED | 249 |
ERROR_START_USER_SERVICE_FAILED | 250 |
ERROR_SYSTEM_SERVICE_ON_START_EXCEPTION | 251 |
ERROR_SHUTDOWN_USER_SERVICE_FAILED | 252 |
ERROR_SYSTEM_SERVICE_ON_STOP_EXCEPTION | 253 |
ERROR_SYSTEM_SERVICE_ON_CHANGE_EXCEPTION | 254 |
ERROR_REGISTER_USER_SERVICE_FAILED | 255 |
ERROR_UNREGISTER_USER_SERVICE_FAILED | 256 |
ERROR_REQUEST_UNLOCK_FAILED | 257 |
ERROR_NOTIFY_USER_SERVICE_CHANGED_FAILED | 258 |
ERROR_ENABLE_AUTOLOGON_MODULE_FAILED | 259 |
ERROR_DIRECTORY_NOT_EXIST | 260 |
ERROR_FILE_NOT_FOUND | 261 |