mirror of https://github.com/nocodb/nocodb
Pranav C
2 months ago
16 changed files with 55 additions and 68 deletions
@ -1,27 +0,0 @@
|
||||
// a class to log messages to the console with colors and styles
|
||||
export class NcLogger { |
||||
static log(message: string) { |
||||
console.log(message); |
||||
} |
||||
|
||||
static error(message: string) { |
||||
console.error('\x1b[31m%s\x1b[0m', 'Error: ' + message); |
||||
} |
||||
|
||||
static warn(message: string) { |
||||
console.warn('\x1b[33m%s\x1b[0m', 'Warning: ' + message); |
||||
} |
||||
|
||||
static info(message: string) { |
||||
console.info('\x1b[32m%s\x1b[0m', 'Info: ' + message); |
||||
} |
||||
|
||||
static success(message: string) { |
||||
console.log('\x1b[32m%s\x1b[0m', 'Success: ' + message); |
||||
} |
||||
|
||||
static debug(message: string) { |
||||
console.debug('\x1b[34m%s\x1b[0m', 'Debug: ' + message); |
||||
}
|
||||
|
||||
} |
@ -1,4 +1,4 @@
|
||||
export * from './NcConfig'; |
||||
export * from './NcError'; |
||||
export * from './NcLogger'; |
||||
export * as logger from './logger'; |
||||
export * from './SecretManager'; |
@ -0,0 +1,25 @@
|
||||
import chalk from 'chalk'; |
||||
|
||||
export function log(message: string) { |
||||
console.log(chalk.white(message)); |
||||
} |
||||
|
||||
export function error(message: string) { |
||||
console.error(chalk.red('Error: ' + message)); |
||||
} |
||||
|
||||
export function warn(message: string) { |
||||
console.warn(chalk.yellow('Warning: ' + message)); |
||||
} |
||||
|
||||
export function info(message: string) { |
||||
console.info(chalk.green('Info: ' + message)); |
||||
} |
||||
|
||||
export function success(message: string) { |
||||
console.log(chalk.green('Success: ' + message)); |
||||
} |
||||
|
||||
export function debug(message: string) { |
||||
console.debug(chalk.blue('Debug: ' + message)); |
||||
} |
@ -1,5 +1,9 @@
|
||||
export { SqlClientFactory } from '~/db/sql-client/lib/SqlClientFactory'; |
||||
export { MetaTable } from '~/utils/globals'; |
||||
export * from '~/utils/encryptDecrypt'; |
||||
export { getToolDir, metaUrlToDbConfig, prepareEnv } from '~/utils/nc-config/helpers'; |
||||
export { |
||||
getToolDir, |
||||
metaUrlToDbConfig, |
||||
prepareEnv, |
||||
} from '~/utils/nc-config/helpers'; |
||||
export { DriverClient } from '~/utils/nc-config/constants'; |
||||
|
Loading…
Reference in new issue