Skip to content

Commit

Permalink
docs: swap console log for app logger in japanese examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeg committed Dec 11, 2024
1 parent 67d0804 commit 5646f44
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const app = new App({

(async () => {
await app.start();
console.log('⚡️ Bolt app started');
app.logger.info('⚡️ Bolt app started');
})();
```

Expand All @@ -71,7 +71,7 @@ app.event('message', async ({ event, client }) => {
});

receiver.router.use((req, res, next) => {
console.log(`Request time: ${Date.now()}`);
app.logger.info(`Request time: ${Date.now()}`);
next();
});

Expand All @@ -83,6 +83,6 @@ receiver.router.post('/secret-page', (req, res) => {

(async () => {
await app.start();
console.log('⚡️ Bolt app started');
app.logger.info('⚡️ Bolt app started');
})();
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const app = new App({
// init() メソッドを呼び出したので、`start()` メソッドを安全に呼び出すことができる
await app.start(process.env.PORT || 3000);
} catch (e) {
console.log(e);
app.logger.error(e);
process.exit(1);
}
})()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const app = new App({
// より一般的なグローバルのエラーハンドラー
app.error(async (error) => {
// メッセージ送信をリトライすべきか、アプリを停止すべきか判断するためにエラーの詳細を確認
console.error(error);
app.logger.error(error);
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const app = new App({

(async () => {
await app.start();
console.log('⚡️ Bolt app started');
app.logger.info('⚡️ Bolt app started');
})();
```

Expand Down Expand Up @@ -48,6 +48,6 @@ const app = new App({

(async () => {
await app.start();
console.log('⚡️ Bolt app started');
app.logger.info('⚡️ Bolt app started');
})();
```
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const app = new App({
// アプリを起動します
await app.start(process.env.PORT || 3000);

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
```

Expand Down Expand Up @@ -250,7 +250,7 @@ app.message('hello', async ({ message, say }) => {
// アプリを起動します
await app.start();

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
```

Expand All @@ -275,7 +275,7 @@ app.message('hello', async ({ message, say }) => {
// アプリを起動します
await app.start(process.env.PORT || 3000);

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
```

Expand Down Expand Up @@ -366,7 +366,7 @@ app.message('hello', async ({ message, say }) => {
// アプリを起動します
await app.start();

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
```

Expand Down Expand Up @@ -410,7 +410,7 @@ app.message('hello', async ({ message, say }) => {
// アプリを起動します
await app.start(process.env.PORT || 3000);

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
```

Expand Down Expand Up @@ -482,7 +482,7 @@ app.action('button_click', async ({ body, ack, say }) => {
// アプリを起動します
await app.start();

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
```

Expand Down Expand Up @@ -533,7 +533,7 @@ app.action('button_click', async ({ body, ack, say }) => {
// アプリを起動します
await app.start(process.env.PORT || 3000);

console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
})();
```

Expand Down

0 comments on commit 5646f44

Please sign in to comment.