New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.2.0] Control low level debug routines via config.php #1806
Comments
netniV
added a commit
to netniV/cacti
that referenced
this issue
Aug 7, 2018
This patch adds functionality to control the debugging of low level routines via defines within the config.php file. In order to allow flexibility, if these are defined, variables within the $config array are primed as true, otherwise false. These elements within the $config array are defined in uppercase to highlight the difference between these are other ordinary configuration optios. Should a function or program need to enable debugging of these various options, simply setting the value to true in the $config array will enable logging from that point. Inversely, setting it to false will stop logging from that point. The only option that is of limited use is DEBUG_READ_CONFIG_OPTION_DB_OPEN that will only work up to the database being open. Setting this to true after the database has already been opened will not automatic turn off the companion option DEBUG_READ_CONFIG_OPTION since the db_connect_real() will not be called again. The list of options and their functionality are: - DEBUG_READ_CONFIG_OPTION : record use of read_config_option() to cacti-option.log in the system temporary folder - DEBUG_READ_CONFIG_OPTION_DB_OPEN : Once the database has been successfully opened, disable DEBUG_READ_CONFIG_OPTION - DEBUG_SQL_CMD : Always write a copy of the SQL being requested to the cacti-sql.log file in the system temporary folder - DEBUG_SQL_FLOW : Write flow of db_xxx calls to the cacti-sql.log in the system temporary folder. The system temporary folder is normally set to one of the following: - Linux, CLI: /tmp/ - Linux, WEB: Apache/Ngix's temporary folder - Windows, CLI: %TEMP% - Windows, WEB: Temp folder of web user or %WINDIR%\TEMP
cigamit
pushed a commit
that referenced
this issue
Aug 7, 2018
This patch adds functionality to control the debugging of low level routines via defines within the config.php file. In order to allow flexibility, if these are defined, variables within the $config array are primed as true, otherwise false. These elements within the $config array are defined in uppercase to highlight the difference between these are other ordinary configuration optios. Should a function or program need to enable debugging of these various options, simply setting the value to true in the $config array will enable logging from that point. Inversely, setting it to false will stop logging from that point. The only option that is of limited use is DEBUG_READ_CONFIG_OPTION_DB_OPEN that will only work up to the database being open. Setting this to true after the database has already been opened will not automatic turn off the companion option DEBUG_READ_CONFIG_OPTION since the db_connect_real() will not be called again. The list of options and their functionality are: - DEBUG_READ_CONFIG_OPTION : record use of read_config_option() to cacti-option.log in the system temporary folder - DEBUG_READ_CONFIG_OPTION_DB_OPEN : Once the database has been successfully opened, disable DEBUG_READ_CONFIG_OPTION - DEBUG_SQL_CMD : Always write a copy of the SQL being requested to the cacti-sql.log file in the system temporary folder - DEBUG_SQL_FLOW : Write flow of db_xxx calls to the cacti-sql.log in the system temporary folder. The system temporary folder is normally set to one of the following: - Linux, CLI: /tmp/ - Linux, WEB: Apache/Ngix's temporary folder - Windows, CLI: %TEMP% - Windows, WEB: Temp folder of web user or %WINDIR%\TEMP
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Some temporary debugging functions that were added recently should have proper control via the $config.php file.
The text was updated successfully, but these errors were encountered: