From b771a7f18f2f2314798ba4b6baaaa807bbd2764e Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Tue, 18 Oct 2016 09:59:29 -0400 Subject: [PATCH] RIFT-14876: Updated parts of logging to use v2 Signed-off-by: Laurence Maultsby --- skyquake/plugins/logging/api/logging.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/skyquake/plugins/logging/api/logging.js b/skyquake/plugins/logging/api/logging.js index 086d86476..00cd1d63c 100644 --- a/skyquake/plugins/logging/api/logging.js +++ b/skyquake/plugins/logging/api/logging.js @@ -1,6 +1,6 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,12 +16,13 @@ * limitations under the License. * */ +'use strict'; var Promise = require('bluebird'); var utils = require('../../../framework/core/api_utils/utils.js'); var request = utils.request; var constants = require('../../../framework/core/api_utils/constants.js'); var _ = require('lodash'); -var APIVersion = '/v1'; +var APIVersion = '/v2'; var transforms = require('./transforms.js'); var foreverOn = true; @@ -251,11 +252,13 @@ Aggregate.set = function(req) { // Do nothing to test delay in response var encoder = new transforms.LoggingConfigEncoder(); var data = encoder.encode(req.body); - //console.log("Aggregate.set. encoded data="); - //console.log(data); + // console.log("Aggregate.set. encoded data="); + // console.log(data); // dumpLoggingConfig(data); - - return handlePutRequest(req, APIVersion + '/api/config/logging', data); + let setData = { + 'rwlog-mgmt:logging' : data + } + return handlePutRequest(req, APIVersion + '/api/config/logging', setData); // if (this.mockResponse['set']) { // return handleMockResponse(req, true, 201, data, delay=100); // } @@ -398,6 +401,7 @@ Config.setSyslogViewer = function(req) { // Operational calls Operational.get = function(req) { + var APIVersion = '/v1' return handleGetRequest(req, APIVersion + '/api/operational/logging?deep', transformLoggingRootResponseCallback ); -- 2.17.1