Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blocks:drivers:troubleshooting [2018-01-13 20:59] admin [Viewing the Log Remotely] |
blocks:drivers:troubleshooting [2024-10-25 06:00] (current) admin Bad link |
||
---|---|---|---|
Line 10: | Line 10: | ||
If a driver doesn' | If a driver doesn' | ||
- | PIXILAN-root/ | + | PIXILAB-Blocks-root/ |
Open a terminal window (" | Open a terminal window (" | ||
Line 40: | Line 40: | ||
*/ | */ | ||
interface console { | interface console { | ||
- | log(...toLog: | + | log(...toLog: |
- | info(...toLog: | + | info(...toLog: |
- | error(...toLog: | + | error(...toLog: |
- | warn(...toLog: | + | warn(...toLog: |
} | } | ||
</ | </ | ||
:!: You may want to remove, or comment out, any logging calls in your driver once you get it working. This avoids unwanted noise in the log file, and may slightly improve the performance of your driver. | :!: You may want to remove, or comment out, any logging calls in your driver once you get it working. This avoids unwanted noise in the log file, and may slightly improve the performance of your driver. | ||
- | |||
==== 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 // | + | 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 // |
< | < | ||
# Logging verbosity level. Specify one of ERROR, WARN, INFO | # Logging verbosity level. Specify one of ERROR, WARN, INFO | ||
logging: | logging: | ||
- | | + | |
+ | Script: INFO # Verbose logging for scripts/ | ||
</ | </ | ||
- | If the file doesn' | + | If the file doesn' |
- | + | ||
- | :!: 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 ===== | ||
- | While a separate development computer is preferable for driver development, | + | While a separate development computer is preferable for driver development, |
==== Archived Log Files ==== | ==== Archived Log Files ==== | ||
Line 71: | Line 70: | ||
If you want to investigate an error that occurred some time ago, the information may no longer be in the // | If you want to investigate an error that occurred some time ago, the information may no longer be in the // | ||
- | ===== Enable Hot-swapping of Drivers | + | ===== Reloading Changes Automatically |
- | When you add drivers, or make changes to a driver, you must normally restart Blocks for those changes to take effect. As this can make the development more time consuming, | + | When you change |
< | < |