Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ロギング
Search
Jamie Birch
June 25, 2025
Technology
0
2
ロギング
I gave this lightning talk at
React Native Meetup #22
.
Jamie Birch
June 25, 2025
Tweet
Share
More Decks by Jamie Birch
See All by Jamie Birch
View Transition API
shirakaba
1
1.4k
ビルド・プロファイリング
shirakaba
0
20
Build profiling
shirakaba
0
43
React Native, Meet Node.js native addons
shirakaba
0
12
Expo Prebuild, Demystified
shirakaba
0
27
A History of JavaScript on Mobile
shirakaba
0
610
SvelteでMacアプリを作りましょう!
shirakaba
0
84
Hello, NativeScript
shirakaba
0
150
最後のネイティブ・モジュール
shirakaba
0
61
Other Decks in Technology
See All in Technology
生成AI時代 文字コードを学ぶ意義を見出せるか?
hrsued
1
300
SalesforceArchitectGroupOsaka#20_CNX'25_Report
atomica7sei
0
170
BigQuery Remote FunctionでLooker Studioをインタラクティブ化
cuebic9bic
3
280
250627 関西Ruby会議08 前夜祭 RejectKaigi「DJ on Ruby Ver.0.1」
msykd
PRO
2
270
Prox Industries株式会社 会社紹介資料
proxindustries
0
290
ハノーバーメッセ2025座談会.pdf
iotcomjpadmin
0
160
製造業からパッケージ製品まで、あらゆる領域をカバー!生成AIを利用したテストシナリオ生成 / 20250627 Suguru Ishii
shift_evolve
PRO
1
140
2025-06-26_Lightning_Talk_for_Lightning_Talks
_hashimo2
2
100
第9回情シス転職ミートアップ_テックタッチ株式会社
forester3003
0
230
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
140
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
29
11k
より良いプロダクトの開発を目指して - 情報を中心としたプロダクト開発 #phpcon #phpcon2025
bengo4com
1
3.1k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
48
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Agile that works and the tools we love
rasmusluckow
329
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
YesSQL, Process and Tooling at Scale
rocio
173
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Done Done
chrislema
184
16k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Writing Fast Ruby
sferik
628
61k
Transcript
ϩΪϯά Jamie Birch δΣΠϛʔ ό ʔ ν ໊ බ
React Native ͷϩΪϯά͕Γͳ͍ w w w w
ୈҰͷྫ ΦϒδΣΫτɾϩΪϯά
const result = hoge(); // ᶃ ίϯιʔϧ console.log(result); // ᶄ
όοΫΤϯυ fetch('https://ore-no-backend.jp', { method: 'POST', body: `${result}`, }); 192.168.1.1 - - 200 POST / [object Object] (NOBRIDGE) LOG {"1": {"2": {"3": [Object]}}}
ཧͳΞτϓοτ {"1": {"2": {"3": { "4": 1234}}}} ᶃ Χϥʔ ᶄ
ೖΕࢠʹ͞ΕͨཁૉΛද͢
ୈೋͷྫ ΤϥʔɾϩΪϯά
try { hoge(); } catch (error) { // ᶃ ίϯιʔϧ
console.error(error); // ᶄ όοΫΤϯυ fetch('https://ore-no-backend.jp', { method: 'POST', body: `${error}`, }); } 192.168.1.1 - - 200 POST / Error hoge (NOBRIDGE) ERROR [Error: hoge]
Error: hoge at file:///Users/shirakaba/demo.js:4:23 at ModuleJob.run (node:internal/modules/esm/module_job:274:25) at async onImport.tracePromise.__proto__
(node:internal/modules/esm/loader:644:26) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) { [cause]: Error: fuga at file:///Users/shirakaba/demo.js:4:51 at ModuleJob.run (node:internal/modules/esm/module_job:274:25) at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:644:26) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) } ཧͳΞτϓοτ ᶃ ελοΫτϨʔε ᶄ ݪҼ
JSON.stringify() Λ͑ʁ
JSON.stringify() ͷऑ console.log(JSON.stringify(error)); (NOBRIDGE) LOG {} const hoge = {
fuga: {} }; hoge.fuga = hoge; console.log(JSON.stringify(hoge)); (NOBRIDGE) ERROR [TypeError: cyclical structure in JSON object]
͡ΌɺͲ͏͢Ε͍͍͔ʁ
util.inspect() Λհ͠Α͏ • import { inspect } from 'node:util';
Node.js ͷίΞϞδϡʔϧɻ • σʔλܕΛέʔεόΠέʔεͰจࣈྻʹγϦΞϥΠζ͢ΔͨΊͷͷɻ • ԿͰରԠͰ͖Δʂ • React Native Ͱ͑Δͱ͍͍ͳ…
ˎ5000ߦҎ্ͷίʔυ Λநग़ͨ͠
import { inspect } from "util-inspect-isomorphic"; // ⭐ error.causeΛγϦΞϥΠζ͢Δ ⭐
console.error(inspect(new Error("hoge", { cause: new Error("fuga") }))); // Error: hoge // at file:///Users/shirakaba/demo.js:4:23 // at ModuleJob.run (node:internal/modules/esm/module_job:274:25) // at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:644:26) // at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) { // [cause]: Error: fuga // at file:///Users/shirakaba/demo.js:4:51 // at ModuleJob.run (node:internal/modules/esm/module_job:274:25) // at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:644:26) // at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) // } // ⭐ ਂ͘ωετͨ͠ΦϒδΣΫτΛϓϦϯτ͢Δ ⭐ console.log(inspect({ a: { b: { c: { d: {} } } } }, { depth: null })); // { // a: { b: { c: { d: {} } } } // } // ⭐ ΧϥʔΛ͚Δ ⭐ console.log(inspect(["hoge", new Date(), true], { colors: true })); // [ 'hoge', 2025-06-07T11:35:11.755Z, true ] // ⭐ φϯόʔʹΞϯμʔείΞΛ͚Δ ⭐ console.log(inspect(1000000000, { numericSeparator: true })); // 1_000_000_000
݁ • σʔλܕΛదʹϩάग़ྗ͢ΔʹɺέʔεόΠέʔεͰରԠ͕ඞཁɻ • React Native Ͱ error.cause Λϩάʹग़ͤͳ͍ͨΊɺ΄ͱΜͲΘΕͯ ͍ͳ͍ͣɻ
• util-inspect-isomorphic Λ͏ͱɺԿͷσʔλܕͰରԠͰ͖Δɻ
ϓϩϑΟϧ ౦ژ ͷΤϯδχΞ @shirakaba @birch_js @shirakaba.bsky.social ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ Jamie Birch δΣΠϛʔ
ό ʔ ν ໊ බ