Skip to content

Commit

Permalink
feat(cli): support logDiff
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 13, 2021
1 parent 53b139f commit c07692b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/koishi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface WatchConfig extends WatchOptions {
export interface AppConfig extends AppOptions {
plugins?: PluginConfig
logLevel?: LogLevel
logDiff?: boolean
logTime?: string | boolean
watch?: WatchConfig
}
1 change: 1 addition & 0 deletions packages/koishi/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ if (typeof config.logLevel === 'object') {

if (config.logTime === true) config.logTime = 'yyyy/MM/dd hh:mm:ss'
if (config.logTime) Logger.showTime = config.logTime
if (config.logDiff !== undefined) Logger.showDiff = config.logDiff

// cli options have higher precedence
if (process.env.KOISHI_LOG_LEVEL) {
Expand Down

0 comments on commit c07692b

Please sign in to comment.