1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-20 20:55:18 +02:00
This commit is contained in:
Laurent Cozic 2020-12-28 17:26:15 +00:00
parent 0e0de1207f
commit 34a99f738c
3 changed files with 6 additions and 6 deletions

View File

@ -180,7 +180,7 @@ class Logger {
if (level == LogLevel.Warn) fn = 'warn'; if (level == LogLevel.Warn) fn = 'warn';
if (level == LogLevel.Info) fn = 'info'; if (level == LogLevel.Info) fn = 'info';
const consoleObj = target.console ? target.console : console; const consoleObj = target.console ? target.console : console;
let items:any[] = []; let items: any[] = [];
if (target.format) { if (target.format) {
const format = level === LogLevel.Info && target.formatInfo ? target.formatInfo : target.format; const format = level === LogLevel.Info && target.formatInfo ? target.formatInfo : target.format;

View File

@ -71,7 +71,7 @@ app.use(async (ctx: Koa.Context) => {
} }
} catch (error) { } catch (error) {
if (error.httpCode >= 400 && error.httpCode < 500) { if (error.httpCode >= 400 && error.httpCode < 500) {
appLogger().error(error.httpCode + ': ' + `${ctx.request.method} ${ctx.path}` + ' : ' + error.message); appLogger().error(`${error.httpCode}: ` + `${ctx.request.method} ${ctx.path}` + ` : ${error.message}`);
} else { } else {
appLogger().error(error); appLogger().error(error);
} }

View File

@ -145,7 +145,7 @@ export function parseSubPath(p: string): SubPath {
return output; return output;
} }
export function routeResponseFormat(match: MatchedRoute, rawPath:string): RouteResponseFormat { export function routeResponseFormat(match: MatchedRoute, rawPath: string): RouteResponseFormat {
if (match && match.route.responseFormat) return match.route.responseFormat; if (match && match.route.responseFormat) return match.route.responseFormat;
let path = rawPath; let path = rawPath;