78 lines
6.0 KiB
Plaintext
78 lines
6.0 KiB
Plaintext
#
|
|
# WL#9323: Logging services: Improved error logging in 8.0
|
|
#
|
|
SET @old_log_error_verbosity = @@global.log_error_verbosity;
|
|
SET @@global.log_error_verbosity=3;
|
|
FLUSH LOGS;
|
|
SET @@session.debug="+d,parser_stmt_to_error_log";
|
|
SET @@session.debug="+d,log_error_normalize";
|
|
SELECT @@global.log_error_services;
|
|
@@global.log_error_services
|
|
log_filter_internal; log_sink_internal
|
|
|
|
INSTALL COMPONENT "file://component_log_sink_json";
|
|
SET GLOBAL log_error_services= "log_filter_internal; log_sink_internal; log_filter_internal; log_sink_json";
|
|
ERROR 42000: Variable 'log_error_services' can't be set to the value of 'log_filter_internal; log_sink_internal; log_filter_internal; log_sink_json'
|
|
SET GLOBAL log_error_services= "log_filter_internal; log_sink_internal; log_sink_json";
|
|
SELECT "Let's do the double dutch!";
|
|
Let's do the double dutch!
|
|
Let's do the double dutch!
|
|
SET GLOBAL log_error_services= "log_sink_internal; log_sink_internal";
|
|
ERROR 42000: Variable 'log_error_services' can't be set to the value of 'log_sink_internal; log_sink_internal'
|
|
SET GLOBAL log_error_services= "log_sink_json; log_sink_json";
|
|
SELECT "Jacob Toot-Toot";
|
|
Jacob Toot-Toot
|
|
Jacob Toot-Toot
|
|
SET GLOBAL log_error_services= DEFAULT;
|
|
UNINSTALL COMPONENT "file://component_log_sink_json";
|
|
SET GLOBAL log_error_verbosity= 1;
|
|
SELECT "I should NOT be visible in the error log!";
|
|
I should NOT be visible in the error log!
|
|
I should NOT be visible in the error log!
|
|
SET GLOBAL log_error_services= "log_sink_internal";
|
|
SELECT "I SHOULD be visible in the error log!";
|
|
I SHOULD be visible in the error log!
|
|
I SHOULD be visible in the error log!
|
|
SET GLOBAL log_error_services= DEFAULT;
|
|
SET @@session.debug="+d,parser_stmt_to_error_log_with_system_prio";
|
|
SELECT "I should be visible with \"System\" label!";
|
|
I should be visible with "System" label!
|
|
I should be visible with "System" label!
|
|
SET @@session.debug="-d,parser_stmt_to_error_log_with_system_prio";
|
|
SET GLOBAL log_error_verbosity= DEFAULT;
|
|
|
|
# cleanup
|
|
SET @@session.debug="-d,parser_stmt_to_error_log";
|
|
SET @@session.debug="-d,log_error_normalize";
|
|
FLUSH ERROR LOGS;
|
|
|
|
###
|
|
### error log file
|
|
###
|
|
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SET @@session.debug="+d,log_error_normalize"
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SELECT @@global.log_error_services
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: INSTALL COMPONENT "file://component_log_sink_json"
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SET GLOBAL log_error_services= "log_filter_internal; log_sink_internal; log_filter_internal; log_sink_json"
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SET GLOBAL log_error_services= "log_filter_internal; log_sink_internal; log_sink_json"
|
|
{ "prio" : 3, "subsystem" : "Server", "source_file" : "sql_parse.cc", "function" : "dispatch_command", "msg" : "Parser saw: SET GLOBAL log_error_services= \"log_filter_internal; log_sink_internal; log_sink_json\"", "time" : "1970-01-01T00:00:00.000000Z", "thread" : 0, "err_symbol" : "ER_PARSER_TRACE", "SQL_state" : "XX999", "label" : "Note" }
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SELECT "Let's do the double dutch!"
|
|
{ "prio" : 3, "subsystem" : "Server", "source_file" : "sql_parse.cc", "function" : "dispatch_command", "msg" : "Parser saw: SELECT \"Let's do the double dutch!\"", "time" : "1970-01-01T00:00:00.000000Z", "thread" : 0, "err_symbol" : "ER_PARSER_TRACE", "SQL_state" : "XX999", "label" : "Note" }
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SET GLOBAL log_error_services= "log_sink_internal; log_sink_internal"
|
|
{ "prio" : 3, "subsystem" : "Server", "source_file" : "sql_parse.cc", "function" : "dispatch_command", "msg" : "Parser saw: SET GLOBAL log_error_services= \"log_sink_internal; log_sink_internal\"", "time" : "1970-01-01T00:00:00.000000Z", "thread" : 0, "err_symbol" : "ER_PARSER_TRACE", "SQL_state" : "XX999", "label" : "Note" }
|
|
{ "prio" : 3, "subsystem" : "Server", "source_file" : "sql_parse.cc", "function" : "dispatch_command", "msg" : "Parser saw: SET GLOBAL log_error_services= \"log_sink_json; log_sink_json\"", "time" : "1970-01-01T00:00:00.000000Z", "thread" : 0, "err_symbol" : "ER_PARSER_TRACE", "SQL_state" : "XX999", "label" : "Note", "stream_id" : "0" }
|
|
{ "prio" : 3, "subsystem" : "Server", "source_file" : "sql_parse.cc", "function" : "dispatch_command", "msg" : "Parser saw: SET GLOBAL log_error_services= \"log_sink_json; log_sink_json\"", "time" : "1970-01-01T00:00:00.000000Z", "thread" : 0, "err_symbol" : "ER_PARSER_TRACE", "SQL_state" : "XX999", "label" : "Note", "stream_id" : "1" }
|
|
{ "prio" : 3, "subsystem" : "Server", "source_file" : "sql_parse.cc", "function" : "dispatch_command", "msg" : "Parser saw: SELECT \"Jacob Toot-Toot\"", "time" : "1970-01-01T00:00:00.000000Z", "thread" : 0, "err_symbol" : "ER_PARSER_TRACE", "SQL_state" : "XX999", "label" : "Note", "stream_id" : "0" }
|
|
{ "prio" : 3, "subsystem" : "Server", "source_file" : "sql_parse.cc", "function" : "dispatch_command", "msg" : "Parser saw: SELECT \"Jacob Toot-Toot\"", "time" : "1970-01-01T00:00:00.000000Z", "thread" : 0, "err_symbol" : "ER_PARSER_TRACE", "SQL_state" : "XX999", "label" : "Note", "stream_id" : "1" }
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SET GLOBAL log_error_services= DEFAULT
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: UNINSTALL COMPONENT "file://component_log_sink_json"
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SET GLOBAL log_error_services= "log_sink_internal"
|
|
1970-01-01T00:00:00.000000Z 0 [Note] [MY-010000] [Server] Parser saw: SELECT "I SHOULD be visible in the error log!"
|
|
1970-01-01T00:00:00.000000Z 0 [System] [MY-010000] [Server] Parser saw: SET @@session.debug="+d,parser_stmt_to_error_log_with_system_prio"
|
|
1970-01-01T00:00:00.000000Z 0 [System] [MY-010000] [Server] Parser saw: SELECT "I should be visible with \"System\" label!"
|
|
SET @@global.log_error_verbosity=@old_log_error_verbosity;
|
|
|
|
###
|
|
### done
|
|
###
|