GRASS GIS 7 Programmer's Manual  7.9.dev(2020)-164b658f1
debug.c File Reference

GIS Library - Debug functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for debug.c:

Go to the source code of this file.

Functions

void G_init_debug (void)
 Initiate debugging. More...
 
int G_debug (int level, const char *msg,...)
 Print debugging message. More...
 

Detailed Description

GIS Library - Debug functions.

(C) 2001-2012 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
GRASS GIS Development Team

Definition in file debug.c.

Function Documentation

◆ G_debug()

int G_debug ( int  level,
const char *  msg,
  ... 
)

Print debugging message.

Print debugging message if environment variable GRASS_DEBUG_LEVEL is set to level equal or greater

Levels: (recommended levels)

  • 1 - message is printed once or twice per module
  • 2 - less interesting once-per-module messages,
  • 2 - library functions likely to be used once in a module
  • 3 - library functions likely to be called a few times in a module (<=10),
  • 3 - database opening and closing logistics
  • 4 - each row (raster) or line (vector) or database/column (DB),
  • 4 - each column/cat (DB)
  • 5 - each cell (raster) or point (vector) or cat/attribute (DB)
Parameters
[in]levellevel
[in]msgmessage
Returns
0 on error
1 on success

Definition at line 65 of file debug.c.

References G_init_debug().

Referenced by add_coor(), alloc_statistics(), Cairo_Color(), Cairo_end_raster(), Cairo_Erase(), Cairo_Graph_close(), Cairo_Graph_set(), cairo_read_image(), Cairo_Set_window(), cairo_write_image(), close_band_files(), db__driver_begin_transaction(), db__driver_commit_transaction(), db_close_database_shutdown_driver(), db_d_init_error(), db_delete_table(), db_get_login_dump(), db_set_default_connection(), db_start_driver_open_database(), dig__read_head(), dig__write_head(), dig_add_node(), dig_alloc_isles(), dig_area_add_isle(), dig_area_alloc_isle(), dig_area_del_isle(), dig_cidx_free(), dig_cidx_init(), dig_cidx_sort(), dig_del_line(), dig_find_area_box(), dig_find_isle_box(), dig_find_node(), dig_free_plus(), dig_free_plus_areas(), dig_free_plus_isles(), dig_free_plus_lines(), dig_free_plus_nodes(), dig_init_plus(), dig_isle_alloc_line(), dig_load_plus(), dig_node_add_updated(), dig_node_alloc_line(), dig_node_line_angle(), dig_Rd_P_area(), dig_Rd_P_isle(), dig_Rd_P_line(), dig_Rd_P_node(), dig_Rd_Plus_head(), dig_Rd_spidx(), dig_Rd_spidx_head(), dig_read_cidx(), dig_read_cidx_head(), dig_read_frmt_ascii(), dig_select_areas(), dig_select_isles(), dig_select_lines(), dig_select_nodes(), dig_spidx_add_area(), dig_spidx_add_isle(), dig_spidx_add_node(), dig_spidx_del_area(), dig_spidx_del_isle(), dig_spidx_del_node(), dig_spidx_init(), dig_Wr_P_line(), dig_Wr_P_node(), dig_Wr_Plus_head(), dig_Wr_spidx(), dig_Wr_spidx_head(), dig_write_cidx_head(), free_perimeters(), G__read_Cell_head(), G_find_raster(), G_find_raster2(), G_find_vector(), G_find_vector2(), G_get_available_mapsets(), G_get_projepsg(), G_has_vector_timestamp(), G_math_add_spvector(), G_math_alloc_spmatrix(), G_math_alloc_spvector(), G_option_to_separator(), G_read_vector_timestamp(), G_str_to_color(), G_write_vector_timestamp(), get_key_data(), GP_delete_site(), gp_delete_site(), GP_draw_site(), gp_free_site(), gp_get_last_site(), gp_get_new_site(), gp_get_prev_site(), gp_get_site(), GP_get_trans(), GP_get_zmode(), gp_init_site(), gp_num_sites(), GP_select_surf(), gp_set_defaults(), GP_set_trans(), GP_set_zmode(), GP_site_exists(), GP_surf_is_selected(), GP_unselect_surf(), GP_unset_style_thematic(), GPJ__get_datum_params(), GPJ_init_transform(), GPJ_osr_to_grass(), gs_calc_normals(), GS_clear(), GS_default_draw_color(), gs_delete_surf(), GS_delete_surface(), GS_done_draw(), GS_draw_fringe(), GS_draw_surf(), GS_draw_wire(), gs_free_surf(), GS_get_aspect(), gs_get_att_src(), gs_get_att_typbuff(), gs_get_att_type(), GS_get_drawres(), GS_get_exag_guess(), GS_get_focus(), GS_get_from(), gs_get_last_surface(), GS_get_modelposition1(), gs_get_new_surface(), gs_get_prev_surface(), gs_get_surf(), GS_get_to(), GS_get_trans(), GS_get_zextents(), GS_get_zrange(), gs_getall_surfaces(), GS_global_exag(), gs_init_surf(), gs_malloc_lookup(), GS_moveto(), GS_new_surface(), gs_num_datah_reused(), gs_num_surfaces(), GS_ready_draw(), gs_set_att_const(), GS_set_att_defaults(), gs_set_defaults(), GS_set_drawres(), GS_set_exag(), GS_set_focus(), GS_set_focus_center_map(), GS_set_global_exag(), GS_set_infocus(), GS_set_nofocus(), GS_set_trans(), GS_set_viewport(), GS_set_wire_color(), GS_surf_exists(), Gs_update_attrange(), gs_update_curmask(), gsd_surf(), gsd_wire_arrows(), gsd_wire_surf(), gsd_wire_surf_const(), gsd_wire_surf_map(), gsds_free_datah(), gv_delete_vect(), GV_delete_vector(), gv_free_vect(), gv_get_last_vect(), gv_get_new_vect(), gv_get_prev_vect(), gv_get_vect(), gv_init_vect(), gv_num_vects(), gv_set_defaults(), GV_set_trans(), GV_unset_style_thematic(), GV_vect_exists(), GVL_delete_vol(), gvl_delete_vol(), GVL_draw_wire(), gvl_file_free_datah(), gvl_free_vol(), GVL_get_dims(), gvl_get_last_vol(), gvl_get_new_vol(), gvl_get_prev_vol(), gvl_get_vol(), gvl_getall_vols(), gvl_init_vol(), GVL_isosurf_add(), GVL_isosurf_del(), gvl_isosurf_freemem(), gvl_isosurf_get_att_src(), GVL_isosurf_get_drawres(), GVL_isosurf_get_flags(), gvl_isosurf_get_isosurf(), gvl_isosurf_init(), GVL_isosurf_num_isosurfs(), gvl_isosurf_set_att_changed(), gvl_isosurf_set_att_const(), GVL_isosurf_set_att_const(), GVL_isosurf_set_drawres(), GVL_isosurf_set_flags(), GVL_isosurf_unset_att(), GVL_new_vol(), gvl_num_vols(), GVL_set_draw_wire(), GVL_set_focus_center_map(), GVL_set_trans(), GVL_slice_get_drawres(), GVL_slice_num_slices(), GVL_slice_set_drawres(), GVL_vol_exists(), gvld_vol(), gvld_wind3_box(), gvld_wire_vol(), I_cluster_exec_allocate(), I_cluster_sum2(), I_find_subgroup(), I_find_subgroup2(), I_find_subgroup_file(), I_find_subgroup_file2(), I_iclass_add_signature(), I_iclass_analysis(), I_iclass_free_statistics(), I_iclass_init_group(), I_iclass_init_signatures(), I_iclass_init_statistics(), M_do_copy(), make_all_statistics(), N_alloc_gradient_field_2d(), N_alloc_gradient_field_3d(), N_assemble_les_2d_param(), N_assemble_les_3d_param(), N_calc_gradient_field_2d_stats(), N_calc_gradient_field_3d_stats(), N_compute_gradient_field_2d(), N_compute_gradient_field_3d(), N_copy_array_2d(), N_copy_array_3d(), N_copy_gradient_2d(), N_copy_gradient_3d(), N_copy_gradient_field_2d(), N_copy_gradient_field_3d(), N_copy_gradient_neighbours_2d(), N_copy_gradient_neighbours_3d(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_copy_gradient_neighbours_z(), N_create_27star(), N_create_5star(), N_create_7star(), N_create_9star(), N_create_gradient_2d(), N_create_gradient_3d(), N_create_gradient_neighbours_2d(), N_create_gradient_neighbours_3d(), N_create_gradient_neighbours_x(), N_create_gradient_neighbours_y(), N_create_gradient_neighbours_z(), N_free_les(), N_get_geom_data_area_of_cell(), N_get_gradient_2d(), N_get_gradient_neighbours_2d(), N_init_geom_data_3d(), N_les_integrate_dirichlet_2d(), N_les_integrate_dirichlet_3d(), Nviz_get_exag(), Nviz_get_exag_height(), Nviz_get_viewpoint_position(), Nviz_look_here(), Nviz_set_rotation(), Nviz_set_viewpoint_persp(), Nviz_set_viewpoint_position(), Nviz_set_viewpoint_twist(), open_band_files(), P_Create_Aux2_Table(), P_Create_Aux4_Table(), perimeter_add_point(), pg_addedge(), PNG_Graph_set(), print_vol_fields(), Rast__create_window_mapping(), Rast__error_handler(), Rast_get_next_marked_d_cat(), Rast_read_fp_range(), Rast_sort_cats(), Rast_unset_window(), rbtree_traverse(), rbtree_traverse_backwd(), read_band_row(), read_coor(), seg_setup(), sort_intersection_list(), sub_Vectmem(), V1_close_nat(), V1_close_ogr(), V1_close_pg(), V1_delete_line_nat(), V1_delete_line_ogr(), V1_delete_line_pg(), V1_open_new_nat(), V1_open_new_ogr(), V1_open_new_pg(), V1_open_old_nat(), V1_open_old_ogr(), V1_open_old_pg(), V1_read_next_line_nat(), V1_read_next_line_pg(), V1_rewind_ogr(), V1_rewind_pg(), V2_close_ogr(), V2_close_pg(), V2_open_old_ogr(), V2_open_old_pg(), V2_rewind_ogr(), V2_rewind_pg(), Vect__open_topo_pg(), Vect__read_head(), Vect_array_to_cat_list(), Vect_attach_isle(), Vect_attach_isles(), Vect_build_line_area(), Vect_build_ogr(), Vect_build_partial(), Vect_build_pg(), Vect_build_sidx_from_topo(), Vect_cat_list_to_array(), Vect_check_dblink(), Vect_cidx_dump(), Vect_cidx_get_field_index(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_coor_info(), Vect_copy(), Vect_find_area(), Vect_find_node(), Vect_get_area_centroid(), Vect_get_area_isle(), Vect_get_area_num_isles(), Vect_get_area_points(), Vect_get_area_points_geos(), Vect_get_dblink(), Vect_get_field(), Vect_get_field2(), Vect_get_field_by_name(), Vect_get_field_number(), Vect_get_finfo_dsn_name(), Vect_get_finfo_geometry_type(), Vect_get_finfo_layer_name(), Vect_get_isle_area(), Vect_get_isle_points(), Vect_get_isle_points_geos(), Vect_get_next_line_id(), Vect_get_point_in_poly_isl(), Vect_get_proj_name(), Vect_graph_add_edge(), Vect_graph_build(), Vect_graph_init(), Vect_graph_set_node_costs(), Vect_hist_command(), Vect_hist_copy(), Vect_hist_rewind(), Vect_hist_write(), Vect_line_parallel2(), Vect_map_del_dblink(), Vect_net_get_line_cost(), Vect_net_get_node_cost(), Vect_open_fidx(), Vect_open_new(), Vect_open_tmp_new(), Vect_open_topo(), Vect_point_buffer2(), Vect_point_in_poly(), Vect_read_dblinks(), Vect_read_next_line(), Vect_rewind(), Vect_save_fidx(), Vect_save_sidx(), Vect_save_topo(), Vect_select_areas_by_polygon(), Vect_select_isles_by_box(), Vect_select_nodes_by_box(), Vect_set_thresh(), Vect_set_updated(), Vect_spatial_index_add_item(), Vect_spatial_index_del_item(), Vect_spatial_index_destroy(), Vect_spatial_index_init(), Vect_write_dblinks(), vector2perimeters(), Vedit_delete_area_centroid(), Vedit_delete_areas_cat(), and Vedit_get_min_distance().

◆ G_init_debug()

void G_init_debug ( void  )

Initiate debugging.

Definition at line 27 of file debug.c.

References G_is_initialized().

Referenced by G_debug(), and G_init_all().