Skip to content

Commit

Permalink
Revert "Use logger in package install handler."
Browse files Browse the repository at this point in the history
This reverts commit d31c890.
  • Loading branch information
skh committed May 11, 2020
1 parent d31c890 commit bc1ac6c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions x-pack/plugins/ingest_manager/server/routes/epm/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
installPackage,
removeInstallation,
} from '../../services/epm/packages';
import { appContextService } from '../../services';

export const getCategoriesHandler: RequestHandler = async (context, request, response) => {
try {
Expand Down Expand Up @@ -122,12 +121,10 @@ export const getInfoHandler: RequestHandler<TypeOf<typeof GetInfoRequestSchema.p
export const installPackageHandler: RequestHandler<TypeOf<
typeof InstallPackageRequestSchema.params
>> = async (context, request, response) => {
const logger = appContextService.getLogger();
const { pkgkey } = request.params;
const savedObjectsClient = context.core.savedObjects.client;
const callCluster = context.core.elasticsearch.adminClient.callAsCurrentUser;
if (logger) logger.info(`Attempting installation of package ${pkgkey}.`);
try {
const { pkgkey } = request.params;
const savedObjectsClient = context.core.savedObjects.client;
const callCluster = context.core.elasticsearch.adminClient.callAsCurrentUser;
const res = await installPackage({
savedObjectsClient,
pkgkey,
Expand All @@ -139,7 +136,6 @@ export const installPackageHandler: RequestHandler<TypeOf<
};
return response.ok({ body });
} catch (e) {
if (logger) logger.error(`Error during installation of package ${pkgkey}: ${e}`);
if (e.isBoom) {
return response.customError({
statusCode: e.output.statusCode,
Expand Down

0 comments on commit bc1ac6c

Please sign in to comment.