Log: Another step in the move from logfiles to priorities.

skygw_[enable|disable]_log has now been removed from the external
interface and priorities must instead be set using
mxs_log_set_priority_enabled(int priority, bool enabled). A bitmask
is already being updated, but internally and as used by the LOG_IF
macros, the actual enabling is still made using logfile ids.

The configuration entries have been replaced as follows:

	log_messages -> log_notice
	log_trace    -> log_info

The old ones can be used, but cause a warning to be logged.

Similarily the maxadmin commands have been updated.
"[enable|disable] log ..." works as expected, but there will be
a message about it being deprecated. Instead there is now a
[enable|disable] log-priority err|warning|notice|info|debug
command that should be used instead.
This commit is contained in:
Johan Wikman
2015-11-13 13:47:10 +02:00
parent 2dcdab29b6
commit bcb918e60b
8 changed files with 238 additions and 238 deletions

View File

@ -125,13 +125,8 @@ int main(int argc, char **argv) {
num_args = optind;
mxs_log_init(NULL, NULL, LOG_TARGET_DEFAULT);
mxs_log_set_augmentation(0);
if (!debug_out)
skygw_log_disable(LOGFILE_DEBUG);
else
skygw_log_enable(LOGFILE_DEBUG);
mxs_log_set_priority_enabled(LOG_DEBUG, debug_out);
if ((inst = calloc(1, sizeof(ROUTER_INSTANCE))) == NULL) {
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,