Skip to content

Commit

Permalink
Enable logs condition improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
antonyagustine committed May 26, 2023
1 parent b62c32b commit 7c43e95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ import {
} from './utils'

const debug = Debug('asset-store-filesystem')
if (process.env.DEBUG === "*") debug.enabled = true;
if (
process.env.DEBUG === "*" ||
(process.env.DEBUG || "").includes("asset-store-filesystem")
) {
debug.enabled = true;
}

interface IAsset {
locale: string,
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ export const getConfig = () => {
export { assetStoreInstance }

const debug = Debug('asset-store-filesystem')
if (process.env.DEBUG === '*') debug.enabled = true;
if (
process.env.DEBUG === "*" ||
(process.env.DEBUG || "").includes("asset-store-filesystem")
) {
debug.enabled = true;
}

/**
* @description to start the asset connector
Expand Down

0 comments on commit 7c43e95

Please sign in to comment.