mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce7f0bca9f | ||
|
|
ae1c4d936b |
@@ -6,6 +6,7 @@ const COLORS = {
|
|||||||
reset: '\x1b[0m',
|
reset: '\x1b[0m',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const env = process.env.NODE_ENV || 'development';
|
||||||
const useColor = process.stdout.isTTY || process.stderr.isTTY;
|
const useColor = process.stdout.isTTY || process.stderr.isTTY;
|
||||||
|
|
||||||
function ts() {
|
function ts() {
|
||||||
@@ -27,6 +28,10 @@ function lvl(level) {
|
|||||||
|
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
function log(level, ...args) {
|
function log(level, ...args) {
|
||||||
|
if (level === 'debug' && env !== 'development') {
|
||||||
|
return; // Skip debug logs in non-development environments
|
||||||
|
}
|
||||||
|
|
||||||
const prefix = `[${ts()}] ${lvl(level)}:`;
|
const prefix = `[${ts()}] ${lvl(level)}:`;
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 'debug':
|
case 'debug':
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fredy",
|
"name": "fredy",
|
||||||
"version": "11.6.4",
|
"version": "11.6.5",
|
||||||
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
|
|||||||
Reference in New Issue
Block a user