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.4k
ビルド・プロファイリング
shirakaba
0
21
Build profiling
shirakaba
0
44
React Native, Meet Node.js native addons
shirakaba
0
13
Expo Prebuild, Demystified
shirakaba
0
28
A History of JavaScript on Mobile
shirakaba
0
620
SvelteでMacアプリを作りましょう!
shirakaba
0
86
Hello, NativeScript
shirakaba
0
150
最後のネイティブ・モジュール
shirakaba
0
63
Other Decks in Technology
See All in Technology
Tokyo_reInforce_2025_recap_iam_access_analyzer
hiashisan
0
190
ビギナーであり続ける/beginning
ikuodanaka
3
760
高速なプロダクト開発を実現、創業期から掲げるエンタープライズアーキテクチャ
kawauso
3
9.5k
ゼロからはじめる採用広報
yutadayo
3
960
Delta airlines Customer®️ USA Contact Numbers: Complete 2025 Support Guide
deltahelp
0
710
React開発にStorybookとCopilotを導入して、爆速でUIを編集・確認する方法
yu_kod
1
280
Geminiとv0による高速プロトタイピング
shinya337
1
270
LangChain Interrupt & LangChain Ambassadors meetingレポート
os1ma
2
320
いつの間にか入れ替わってる!?新しいAWS Security Hubとは?
cmusudakeisuke
0
130
スタートアップに選択肢を 〜生成AIを活用したセカンダリー事業への挑戦〜
nstock
0
220
データグループにおけるフロントエンド開発
lycorptech_jp
PRO
1
110
SEQUENCE object comparison - db tech showcase 2025 LT2
nori_shinoda
0
150
Featured
See All Featured
A better future with KSS
kneath
238
17k
Fireside Chat
paigeccino
37
3.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
We Have a Design System, Now What?
morganepeng
53
7.7k
RailsConf 2023
tenderlove
30
1.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
How to Ace a Technical Interview
jacobian
278
23k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
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 δΣΠϛʔ
ό ʔ ν ໊ බ