How to log communication with Kameleo?

  • Created

Checking the log files when you encounter problems is helpful to get a better understanding of how Kameleo works. The log files are generated in the Logs folder on a daily basis. As Kameleo has multiple components, each one creates its own file named after the following pattern: COMPONENTNAME-YYYYMMDD.txt

Kameleo can be configured to log its activities to a file and/or the console. You can set the verbosity of the logging in the appsettings.json file in the root directory of Kameleo. Alternatively, you can also set the verbosity level using a command-line flag, when starting the CLI component.

By default, the Logs folder is available at the following location: C:\Users\YOUR_USERNAME\AppData\Local\Programs\Kameleo\Logs

Set log level using command-line

During development, the recommended way to change the log level is the command-line flag option. Here is an example:

Kameleo.CLI.exe email=<YOUR_EMAIL> password=<YOUR_PASSWORD> verbose=1

Set log level using config file

If you want to make the log level of the application permanent, that can be done by changing the value of the Verbose key in the appsettings.json file, which is located at the root of the installation directory. Here is an example:

  "ListeningHost": "+",
  "ListeningPort": 5050,
  "Verbose": 1

Available log levels

You can use the log level to specify how verbose the logging should be. There are 3 different levels available. If no option is specified, the default level is used, which is 0.

Level Console Output File Output
0 Error messages only Information and Error messages
1 Information and Error messages Information and Error messages
2 Debug, Information and Error messages Debug, Information and Error messages

Was this article helpful?

0 out of 0 found this helpful