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
3
ロギング
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.5k
ビルド・プロファイリング
shirakaba
0
22
Build profiling
shirakaba
0
45
React Native, Meet Node.js native addons
shirakaba
0
13
Expo Prebuild, Demystified
shirakaba
0
29
A History of JavaScript on Mobile
shirakaba
0
630
SvelteでMacアプリを作りましょう!
shirakaba
0
90
Hello, NativeScript
shirakaba
0
150
最後のネイティブ・モジュール
shirakaba
0
64
Other Decks in Technology
See All in Technology
Jitera Company Deck / JP
jitera
0
260
AIを使っていい感じにE2Eテストを書けるようになるまで / Trying to Write Good E2E Tests with AI
katawara
3
1.9k
2025-07-25 NOT A HOTEL TECH TALK ━ スマートホーム開発の最前線 ━ SOFTWARE
wakinchan
0
170
20250728 MCP, A2A and Multi-Agents in the future
yoshidashingo
1
100
経験がないことを言い訳にしない、 AI時代の他領域への染み出し方
parayama0625
0
260
AI駆動開発 with MixLeap Study【大阪支部 #3】
lycorptech_jp
PRO
0
270
LLMでAI-OCR、実際どうなの? / llm_ai_ocr_layerx_bet_ai_day_lt
sbrf248
0
160
ユーザー理解の爆速化とPdMの価値
kakehashi
PRO
1
110
会社もクラウドも違うけど 通じたコスト削減テクニック/Cost optimization strategies effective regardless of company or cloud provider
aeonpeople
2
380
PdM業務における使い分け
shinshiro
0
670
興味の胞子を育て 業務と技術に広がる”きのこ力”
fumiyasac0921
0
290
分散トレーシングによる コネクティッドカーのデータ処理見える化の試み
thatsdone
0
270
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
The Cult of Friendly URLs
andyhume
79
6.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Git: the NoSQL Database
bkeepers
PRO
431
65k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Rails Girls Zürich Keynote
gr2m
95
14k
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 δΣΠϛʔ
ό ʔ ν ໊ බ