Skip to content

Commit fd647bb

Browse files
author
Ovidiu Barabula
committed
fix(core): set debug log level to always active
The debug log level ended up being very useful for outputting current task information, but using the distributed package (no NODE_ENV is set in a new project folder) it doesn't output anything. A new log level has to be created for real debugging purposes.
1 parent e7cc994 commit fd647bb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/util/logger.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('Logger', () => {
6161
});
6262

6363

64-
it('doesn\'t logs out in debug level if env is not \'development\' or \'test\'', () => {
64+
xit('doesn\'t logs out in debug level if env is not \'development\' or \'test\'', () => {
6565
// Set node env to 'production' to prevent debug method to console log
6666
const NODE_ENV = process.env.NODE_ENV;
6767
process.env.NODE_ENV = 'production';

src/util/logger.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ export function Logger(namespace: string): (channel?: string) => ILogger {
7474
* @param messages Arguments to log out
7575
*/
7676
function debug(this: ILogger, ...args: any[]): void {
77-
if (env && !debugEnv.includes(env)) {
78-
return undefined;
79-
}
77+
// TODO: Add a new log level to replace this one
78+
// if (env && !debugEnv.includes(env)) {
79+
// return undefined;
80+
// }
8081
const channel = chalk.hex(LogColors.debug).bold(`@${this.channel}`);
8182
console.log(`${fancyDecoration()}`, channel, ...args);
8283
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy