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
データグループにおけるフロントエンド開発
lycorptech_jp
PRO
1
110
Delegating the chores of authenticating users to Keycloak
ahus1
0
140
第4回Snowflake 金融ユーザー会 Snowflake summit recap
tamaoki
1
290
スタートアップに選択肢を 〜生成AIを活用したセカンダリー事業への挑戦〜
nstock
0
220
Beyond Kaniko: Navigating Unprivileged Container Image Creation
f30
0
140
さくらのIaaS基盤のモニタリングとOpenTelemetry/OSC Hokkaido 2025
fujiwara3
3
450
AI専用のリンターを作る #yumemi_patch
bengo4com
6
4.3k
改めてAWS WAFを振り返る~業務で使うためのポイント~
masakiokuda
2
270
高速なプロダクト開発を実現、創業期から掲げるエンタープライズアーキテクチャ
kawauso
3
9.5k
Flutter向けPDFビューア、pdfrxのpdfium WASM対応について
espresso3389
0
130
ビギナーであり続ける/beginning
ikuodanaka
3
760
United Airlines Customer Service– Call 1-833-341-3142 Now!
airhelp
0
170
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
690
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
A better future with KSS
kneath
238
17k
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Speed Design
sergeychernyshev
32
1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
970
Faster Mobile Websites
deanohume
307
31k
Embracing the Ebb and Flow
colly
86
4.7k
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 δΣΠϛʔ
ό ʔ ν ໊ බ