-
Notifications
You must be signed in to change notification settings - Fork 9
9. Debugging and logging
To gain deeper insight into FlexTaxD's operations and to troubleshoot any issues that may arise, the application supports verbose output, logging, and debugging modes. Additionally, since FlexTaxD databases are SQLite-based, they can be explored using any SQL browser that supports SQLite. Here's how you can leverage these features.
Activating verbose mode is straightforward and can be very useful when you want to see more detailed operational information:
flextaxd --db yourdatabase.fdb [other_arguments] --verboseReplace [other_arguments] with the other commands you're running.
By default, FlexTaxD will create a logs directory in the directory where it's executed, and all run logs will be stored there. If you want to specify a different directory for logs:
flextaxd --db yourdatabase.fdb [other_arguments] --logs /path/to/custom/logdirRemember to replace /path/to/custom/logdir with your preferred log directory.
For debugging purposes, which is especially useful when you're encountering errors or unexpected behavior, you can run:
flextaxd --db yourdatabase.fdb [other_arguments] --debugTo examine the contents of your Fdb directly, you can use any SQL browser that supports SQLite. This is not a function of FlexTaxD itself but rather a feature of the database format it uses. With an SQL browser, you can run queries directly against the database, which can be invaluable for debugging complex issues or for manually verifying the data.
For example, using the sqlite3 command-line tool:
sqlite3 yourdatabase.fdbOnce inside the SQLite prompt, you can explore the database using standard SQL queries.
Keep in mind that while these features are very powerful, they should be used with caution. Verbose output and debugging information can contain a lot of data, which can be overwhelming if you're not sure what you're looking for. SQL browsing, on the other hand, is powerful but requires a good understanding of both SQL and the database schema to be effective.