chore(docutils): tweak some logging
MODIFY
packages/docutils/lib/cli/index.ts
packages/docutils/lib/cli/index.ts
@@ -21,9 +21,9 @@ export async function main(argv = hideBin(process.argv)) {
const y = yargs(argv);
return await y
.scriptName(NAME_BIN)
- .command(validate)
.command(build)
.command(init)
+ .command(validate)
.options({
verbose: {
alias: 'V',
@@ -46,10 +46,9 @@ export async function main(argv = hideBin(process.argv)) {
const {logLevel, verbose} = argv;
if (verbose) {
argv.logLevel = 'debug';
- log.level = LogLevelName.debug;
- } else {
- log.level = LogLevelName[logLevel];
+ log.debug('Debug logging enabled via --verbose');
}
+ log.level = LogLevelName[logLevel];
}
)
.fail(

MODIFY
packages/docutils/lib/typedoc.ts
packages/docutils/lib/typedoc.ts
@@ -12,9 +12,11 @@ import {Application, ArgumentsReader, TypeDocOptions, TypeDocReader} from 'typed
import {DEFAULT_LOG_LEVEL, DEFAULT_REL_TYPEDOC_OUT_PATH, NAME_TYPEDOC_JSON} from './constants';
import {DocutilsError} from './error';
import {guessTypeDocJsonPath, readTypedocJson} from './fs';
-import log from './logger';
+import logger from './logger';
import {relative, stopwatch} from './util';
+const log = logger.withTag('typedoc');
+
/**
* Replaces TypeDoc's homebrew "glob" implementation with a real one
*

chore(docutils): tweak some logging