Skip to content

Commit

Permalink
Remove forceColor flag again
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Feb 19, 2021
1 parent e1a6885 commit 637742e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default function accessLog(arg?: string[]|AccessLogOptions): Middleware {
let blacklist: Set<string>;

let disableColor = false;
let forceColor = false;

if (arg === undefined) {
blacklist = new Set(['/health']);
Expand All @@ -35,10 +34,6 @@ export default function accessLog(arg?: string[]|AccessLogOptions): Middleware {
disableColor = true;
}

if (arg.forceColor) {
forceColor = true;
}

}


Expand All @@ -51,7 +46,7 @@ export default function accessLog(arg?: string[]|AccessLogOptions): Middleware {
counter++;
const reqNumber = counter;

if (forceColor || (!disableColor && chalk.supportsColor)) {
if (!disableColor && chalk.supportsColor) {
return colorLog(reqNumber, ctx, next);
} else {
return monoLog(reqNumber, ctx, next);
Expand Down

0 comments on commit 637742e

Please sign in to comment.