Skip to content

Commit

Permalink
Update logger 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mkopa committed Dec 22, 2020
1 parent f55bd9c commit f21a1c2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tshio/logger",
"version": "1.0.3",
"version": "1.0.4",
"repository": {
"type": "git",
"url": "https://github.com/TheSoftwareHouse/node-common.git"
Expand Down
2 changes: 1 addition & 1 deletion packages/logger/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./logger";
export * from "./logger.types";
export * from "./restrict-from-production"
export * from "./restrict-from-production";
2 changes: 1 addition & 1 deletion packages/logger/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const logFormat = (
});
});

export const createLogger = (keysToHide: string[], env = process.env) =>
export const createLogger = (env = process.env, keysToHide?: string[]) =>
winston.createLogger({
level: env.LOGGING_LEVEL || "debug",
format: winston.format.combine(winston.format.splat(), logFormat(env, keysToHide)),
Expand Down
2 changes: 1 addition & 1 deletion packages/logger/src/tests/logger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createLogger } from "..";

describe("logger", () => {
it("Check logger format", async () => {
const winstonLogger = createLogger(["secure"]);
const winstonLogger = createLogger(process.env, ["secure"]);

class Circular {
constructor() {
Expand Down

0 comments on commit f21a1c2

Please sign in to comment.