Skip to content

Commit

Permalink
fix(debug): Update the version of debuggo and fixed to use the correc…
Browse files Browse the repository at this point in the history
…t function
  • Loading branch information
0xfede committed May 24, 2017
1 parent ed8b0b4 commit 7273f03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"body-parser": "^1.17.1",
"camelcase": "^4.1.0",
"debug": "^2.6.6",
"debuggo": "^1.0.0",
"debuggo": "^1.1.1",
"decamelize": "^1.2.0",
"eredita": "^1.0.1",
"express": "^4.15.2",
Expand Down
6 changes: 3 additions & 3 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { normalizeUri } from 'jsonref';
import { Schema, DynamicSchema } from 'jsonpolice';
import { Router, RouterOptions, RequestHandler, Request, Response, NextFunction } from 'express';
import { Eredita } from 'eredita';
import { createLogger, Logger } from 'debuggo';
import { getLogger, Logger } from 'debuggo';
import { RESTError } from './error';
import { SchemaRegistry } from './schema';
import { Swagger } from './swagger';
Expand Down Expand Up @@ -187,7 +187,7 @@ export class API implements Swagger {
externalDocs?: Swagger.ExternalDocs;

constructor(info?:Swagger, options?:APIOptions) {
this[__logger] = createLogger(this.getDebugLabel());
this[__logger] = getLogger(this.getDebugLabel());
Object.assign(this, (new Eredita(info || {}, new Eredita(_.cloneDeep(__default_swagger)))).mergePath());
delete this.paths;
delete this.tags;
Expand Down Expand Up @@ -307,7 +307,7 @@ export class API implements Swagger {
r.use((_req: Request, res: Response, next: NextFunction) => {
let req: APIRequest = _req as APIRequest;
if (!req.logger) {
req.logger = createLogger(this.getDebugLabel(), this.getDebugContext());
req.logger = getLogger(this.getDebugLabel(), this.getDebugContext());
}
next();
});
Expand Down

0 comments on commit 7273f03

Please sign in to comment.