Skip to main content

Agent Logs

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:

image-20230414102256-3.png

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 LevelMeaning
FatalThe robot cannot or should not recover from this error. Something has gone critically wrong and the process needs to be stopped.
ErrorAn error occurred. The robot will attempt to recover and move on with the next item. Please refer to error code table for more details.
WarnAny important data that we need to stand out from the rest of the log information.
InfoInformation about robot progress. Usually includes when we enter/exit a workflow, when data is read from an external source, etc.
TraceInformation 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:

  1. Open akaBot Agent, choose Setting button
  2. In Setting screen, select Center tab and change the Logging level:

image-20230414104336-4.png

How details the logs are showed:

Logging LevelDefault LogsUser-Defined Logs (using Log Message activity)
OffNoneNone
FatalAll messages logged with Fatal level or higher.All messages logged with Fatal level or higher.
ErrorAll messages logged with Error level or higher.All messages logged with Error level or higher.
WarnAll messages logged with Warn or higher.All messages logged with Warn or higher.
InfoAll messages logged with Info or higher.All messages logged with Info or higher.
DebugAll messages logged with Debug level or higher.Cannot be set by hand.
VerboseAll 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/formatMeaning
log4net.db log4net.db-shm log4net.db-walThese 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.logThis file contains application log of akaBot Agent service. Each configured user bot will have an instance of service.
yyyy-mm-dd_BotAgent.logThis file contains application log of akaBot Agent UI
yyyy-mm-dd_BotExecutor.logThis file contains application log of akaBot Agent executor
yyyy-mm-dd_Studio.logThis file contains application log of akaBot Studio
yyyy-mm-dd_hhmmss_Agent_<projectName>.logThis file contains workflow logs that was run by akaBot Agent
yyyy-mm-dd_hhmmss_Studio_<projectName>.logThis 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/formatMeaning
log4net.db log4net.db-shm log4net.db-walThese 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.logThis file contains application log of akaBot Agent service.
yyyy-mm-dd_msiexec.logThis file contains akaBot installation logs.
yyyy-mm-dd_AutoLogonChecker.logThis 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 nameCode
ERROR-1
SUCCESS0
ERROR_APPDATA_PATH_NOT_EXIST100
ERROR_ILLEGAL_FILE101
ERROR_INVALID_ARGS102
ERROR_INVALID_ENV103
ERROR_LOAD_PLUGINS104
ERROR_READ_XAML_FAILED105
ERROR_WORKFLOW_ABORTED106
ERROR_WORKFLOW_CANCELLED107
ERROR_WORKFLOW_EXCEPTION108
ERROR_WORKFLOW_FAULTED109
ERROR_SETTING_NOT_FOUND110
ERROR_LICENSE_ERROR111
ERROR_INSTANCE_NOT_INITIALIZED200
ERROR_PROXY_SETTING_NOT_VALID201
ERROR_CONNECT_TO_SERVER_TIMEOUT202
ERROR_REQUEST_TO_SERVER_FAILED204
ERROR_AUTHENTICATION_FAILED205
ERROR_HTTP_ABORTED206
ERROR_HTTP_ERROR207
ERROR_HTTP_TIMEOUT208
ERROR_SERVER_RETURN_INVALID_TOKEN209
ERROR_UNKNOWN_EXCEPTION211
ERROR_UNHANDLED_EXCEPTION212
ERROR_WCF_REQUEST_FAILED213
ERROR_SERVER_CANNOT_BE_REACHED214
ERROR_NOT_AUTHENTICATED_TO_SERVER215
ERROR_USERNAME_CANNOT_NULL_EMPTY216
ERROR_PASSWORD_CANNOT_NULL_EMPTY217
ERROR_USERNAME_PASSWORD_CANNOT_NULL_EMPTY218
ERROR_SESSION_FOR_USERNAME_ALREADY_EXIST219
ERROR_SESSION_OF_USERNAME_NOT_EXIST220
ERROR_SETTING_FOR_USER_NOT_FOUND221
ERROR_TIMEOUT_MUST_GREATER_THAN_ZERO222
ERROR_LOAD_SETTING_FILE_FAILED223
ERROR_HTTP_FORBIDDEN224
ERROR_HTTP_UNAUTHORIZED225
ERROR_SET_LOG_LEVEL_FAILED226
ERROR_SET_BOT_CONFIG_FAILED227
ERROR_ALREADY_CONNECT_TO_SERVER228
ERROR_ARGUMENT_CANNOT_BE_NULL229
ERROR_AGENT_IS_BUSY230
ERROR_TASK_ALREADY_EXECUTED231
ERROR_TASK_COMMAND_INVALID232
ERROR_TASK_STATE_INVALID233
ERROR_SERVICE_NOT_INSTALLED234
ERROR_SERVICE_NOT_RUNNING235
ERROR_INVALID_LOG_OBJECT_FORMAT236
ERROR_INVALID_APPDATA_PATH237
ERROR_INVALID_PROGRAMDATA_PATH238
ERROR_PROGRAMDATA_PATH_NOT_EXIST239
ERROR_CENTER_SETTING_CANNOT_BE_NULL240
ERROR_PROXY_SETTING_CANNOT_BE_NULL241
ERROR_MACHINE_NAME_IS_EMPTY242
ERROR_INVALID_AGENT_KEY243
ERROR_INVALID_CENTER_URL244
ERROR_INVALID_PROXY_PORT245
ERROR_INVALID_USERNAME246
ERROR_INVALID_PASSWORD247
ERROR_INVALID_PROXY_URL248
ERROR_GET_SERVICE_PORT_FAILED249
ERROR_START_USER_SERVICE_FAILED250
ERROR_SYSTEM_SERVICE_ON_START_EXCEPTION251
ERROR_SHUTDOWN_USER_SERVICE_FAILED252
ERROR_SYSTEM_SERVICE_ON_STOP_EXCEPTION253
ERROR_SYSTEM_SERVICE_ON_CHANGE_EXCEPTION254
ERROR_REGISTER_USER_SERVICE_FAILED255
ERROR_UNREGISTER_USER_SERVICE_FAILED256
ERROR_REQUEST_UNLOCK_FAILED257
ERROR_NOTIFY_USER_SERVICE_CHANGED_FAILED258
ERROR_ENABLE_AUTOLOGON_MODULE_FAILED259
ERROR_DIRECTORY_NOT_EXIST260
ERROR_FILE_NOT_FOUND261