Logging procedures

Logging procedures dinther Thu, 07/23/2020 - 15:51
Procedure Description Example
logging.flush() Flush the buffer explicitly call logging.flush()
logging.resetadapter() Resets the adapter back to the default: BASIC call logging.resetadapter()
logging.resetcomplevel(comp_id string) Resets the log level for a specific component back to the default: ERROR call logging.resetcomplevel('SQL_REWRITER')
logging.resetflushlevel() Resets the flush level back to the default: INFO call logging.resetflushlevel()
logging.resetlayerlevel(layer_id string) Resets the log level for a specific layer back to the default: ERROR call logging.resetlayerlevel('GDK_ALL')
logging.setadapter(adapter_id string) Sets the adapter call logging.setadapter('BASIC')
logging.setcomplevel(comp_id string, level_id string) Sets the log level for a specific component call logging.setcomplevel('SQL_PARSER', 'DEBUG')
logging.setflushlevel(level_id string) Sets the flush level call logging.setflushlevel('WARNING')
logging.setlayerlevel(layer_id string, level_id string) Sets the log level for a specific layer call logging.setlayerlevel('MAL_ALL', 'DEBUG')

Note: You must include the logging. prefix for these procedures and functions (see examples) in order to work properly.

For explanation how to use the logging procedures see Tracer Tutorial

Logging functions

Function Return type Description Example Result
logging.compinfo() table("id" int, "component" string, "log_level" string) Returns a table with for each component its id and current logging level select * from logging.compinfo()
id component log_level
0 ACCELERATOR M_ERROR
1 ALGO M_ERROR
2 ALLOC M_ERROR
3 BAT_ M_ERROR
4 CHECK_ M_ERROR
5 DELTA M_ERROR
6 HEAP M_ERROR
7 IO_ M_ERROR
8 PAR M_ERROR
9 PERF M_ERROR
10 TEM M_ERROR
11 THRD M_ERROR
12 GEOM M_ERROR
13 LIDAR M_ERROR
14 FITS M_ERROR
15 SHP M_ERROR
16 SQL_PARSER M_ERROR
17 SQL_TRANS M_ERROR
18 SQL_REWRITER M_ERROR
19 SQL_EXECUTION M_ERROR
20 SQL_STORE M_ERROR
21 MAL_WLC M_ERROR
22 MAL_REMOTE M_ERROR
23 MAL_MAPI M_ERROR
24 MAL_SERVER M_ERROR
25 MAL_OPTIMIZER M_ERROR
26 GDK M_ERROR

For convenience there is also a system view logging.compinfo which selects all from logging.compinfo().
So you can also use query: SELECT * FROM logging.compinfo to get the same result.