Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:drivers:troubleshooting [2018-03-07 19:58]
admin [Writing Log Messages]
blocks:drivers:troubleshooting [2019-06-05 14:52] (current)
admin updated root dir name
Line 10: Line 10:
 If a driver doesn't work at all, check the log file of the computer running Blocks. This file is located here, under the home directory of the user under which Blocks is running: If a driver doesn't work at all, check the log file of the computer running Blocks. This file is located here, under the home directory of the user under which Blocks is running:
  
- PIXILAN-root/logs/latest.log+ PIXILAB-Blocks-root/logs/latest.log
  
 Open a terminal window ("Terminal" on MacOS or Linux and "Powershell" on Windows). Use the //cd// command to move into the "logs" directory mentioned above. Then type the following command on MacOS: Open a terminal window ("Terminal" on MacOS or Linux and "Powershell" on Windows). Use the //cd// command to move into the "logs" directory mentioned above. Then type the following command on MacOS:
Line 50: Line 50:
 ==== Increasing the Log Level ==== ==== Increasing the Log Level ====
  
-Most troubleshooting methods involve viewing Blocks log file. By default, this log file contains only errors encountered while running Blocks. In some cases, you may want to increase the verbosity of the logging. This can be done by adding the following lines to a file named //config.yml//, located in the //PIXILAN-root// directory in the home directory of the current user:+Most troubleshooting methods involve viewing Blocks log file. By default, this log file contains only errors encountered while running Blocks. In some cases, you may want to increase the verbosity of the logging. This can be done by adding the following lines to a file named //config.yml//, located in the //PIXILAB-Blocks-root// directory in the home directory of the current user:
  
 <code> <code>
 # Logging verbosity level. Specify one of ERROR, WARN, INFO # Logging verbosity level. Specify one of ERROR, WARN, INFO
 logging: logging:
-  level: INFO+  loggers: 
 +    Script: INFO  # Verbose logging for scripts/drivers
 </code> </code>
  
-If the file doesn't exist, create it using a plain text editor. The default value for the verbosity is ERROR, which lists only errors. For more details, change this to //WARN// to also include warnings, or to //INFO// for miscellaneous information. Restart the Blocks server after making any changes to this file. +If the file doesn't exist, create it using a plain text editor. Copy and paste the code above into the file The default value for the verbosity is ERROR, which logs only errors. For more details, change this to //WARN// to also include warnings, or to //INFO// for miscellaneous information, including logging you do using any //console.log// statements in your driver. Restart the Blocks server after making any changes to the config.yml file.
- +
-:!: Setting the logging level to INFO will write lots of internal details to the log file. While you may want it set to INFO while developing drivers, or to troubleshoot other issues, you should set it back to WARN or ERROR for normal use of Blocks.+
  
 +:!: Setting the logging level to INFO may write lots of details to the log file. While you may want it set to INFO while developing drivers, or to troubleshoot other issues, you should set it back to WARN or ERROR for normal use of Blocks.
 ===== Viewing the Log Remotely ===== ===== Viewing the Log Remotely =====
  
Line 72: Line 72:
 ===== Reloading Changes Automatically ===== ===== Reloading Changes Automatically =====
  
-When you change drivers, you must normally restart Blocks for those changes to take effect. As this can make the development more time consuming, and alternative is to enable automatic reloading of scripts. This is also done in the //config.yml// file mentioned above, by adding the following lines:+When you change drivers, you must normally restart Blocks for those changes to take effect. As this can make the development more time consuming, an alternative is to enable automatic reloading of scripts. This is also done in the //config.yml// file mentioned above, by adding the following lines:
  
 <code> <code>