fix(core): update
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import { ConsoleLog } from './smartlog.classes.consolelog';
|
||||
import { LogGroup } from './smartlog.classes.loggroup';
|
||||
import { Smartlog } from './smartlog.classes.smartlog';
|
||||
|
||||
export { Smartlog };
|
||||
export { ConsoleLog, LogGroup, Smartlog };
|
||||
|
10
ts/smartlog.classes.consolelog.ts
Normal file
10
ts/smartlog.classes.consolelog.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
|
||||
/**
|
||||
* a console log optimized for smartlog
|
||||
*/
|
||||
export class ConsoleLog {
|
||||
public log(logLevelArg: plugins.smartlogInterfaces.TLogLevel, logMessageArg: string) {
|
||||
console.log(`__# ${logLevelArg}: ${logMessageArg}`);
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination {
|
||||
* enables console logging
|
||||
*/
|
||||
public enableConsole(optionsArg?: { captureAll: boolean }) {
|
||||
if (optionsArg && optionsArg.captureAll) {
|
||||
if (process && optionsArg && optionsArg.captureAll) {
|
||||
const write = process.stdout.write;
|
||||
/* import * as fs from 'fs';
|
||||
const fileStream = fs.createWriteStream(plugins.path.join(paths.nogitDir, 'output.txt'), {
|
||||
|
Reference in New Issue
Block a user