Skip to content

Commit

Permalink
fix(cli): default log level
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jan 14, 2020
1 parent ab967c4 commit 38cc1e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions packages/koishi-cli/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,11 @@ process.on('unhandledRejection', (error) => {
})

appList.forEach((app) => {
const { logLevel = 0, logFilter = {} } = app.options as AppConfig
const { logLevel = 2, logFilter = {} } = app.options as AppConfig

for (const type of logTypes) {
app.receiver.on(`logger/${type}` as LogEvents, (scope, message) => {
logger[type](message, Math.min(logFilter[scope] ?? logLevel, baseLogLevel))
})
}
app.receiver.on('logger', (scope, message, type) => {
logger[type](message, Math.min(logFilter[scope] ?? logLevel, baseLogLevel))
})
})

startAll().catch((error) => {
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-common/src/authorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export default function apply (ctx: Context, config: AuthorizeConfig) {
}

app.receiver.once('ready', async () => {
logger.info('foo bar')
await Promise.all([
...Object.keys(authorizeUserInverseMap).map(key => updateAuthorizeInfo(+key, authorizeUserInverseMap[+key])),
...Object.entries(authorizeGroup).map(async ([key, value]) => {
Expand Down

0 comments on commit 38cc1e1

Please sign in to comment.