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
Yet another simple logger
Search
Kento Nagata
April 19, 2018
Technology
2
1.8k
Yet another simple logger
Kento Nagata
April 19, 2018
Tweet
Share
More Decks by Kento Nagata
See All by Kento Nagata
中小病院向け、レセコン一体型電子カルテの開発の面白さ
ngtk
0
710
Generating Accessibility Identifiers Easily and Consistently Using Reflection API
ngtk
3
660
プロダクト改善の施策を提案できるようになろう! / Let's be able to propose measures for product growth!
ngtk
14
38k
施策提案ワークショップ / Measures creation workshop
ngtk
3
36k
Swift API Design learning from Cocoa API changes
ngtk
0
850
Page Object Pattern with XCUITest
ngtk
6
2.1k
Atomic Design の導入と実践プロセス
ngtk
4
1.9k
Share Xcode Templates with team
ngtk
2
1.3k
Read the release note of Rails 5.2
ngtk
0
510
Other Decks in Technology
See All in Technology
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
370
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
170
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
250
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
520
5分でわかるDuckDB
chanyou0311
10
3.2k
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
1
110
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
520
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
生成AIのガバナンスの全体像と現実解
fnifni
1
180
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
280
Featured
See All Featured
Building Your Own Lightsaber
phodgson
103
6.1k
GraphQLとの向き合い方2022年版
quramy
44
13k
Being A Developer After 40
akosma
87
590k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
4 Signs Your Business is Dying
shpigford
181
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Speed Design
sergeychernyshev
25
670
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Facilitating Awesome Meetings
lara
50
6.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Transcript
©2018 Wantedly, Inc. Yet another simple logger 19.Apr.2018 - @ngtk,
Kento Nagata
©2018 Wantedly, Inc. Ӭా݈ਓ 8BOUFEMZ *OD&OHJOFFS !OHULOU !OHUL • Wantedly
VisitͷΞϓϦΛ։ൃ͍ͯ͠·͢ • Swift/iOS։ൃΛ͡Ίͯ3ϲ݄͘Β͍ • ͱͱRailsͱ͔React/Reduxͱ͔Σϒͷ։ൃΛ͍ͬͯͨਓ • PotatotipsॳࢀՃ&ॳൃද ☺
©2018 Wantedly, Inc. XcodeͷConsole log׆༻͍ͯ͠·͔͢ʁ
©2018 Wantedly, Inc. ͳΔ͘σόοΨʔΛΘͣʹ ؆୯ʹΛղܾ͍ͨ͠
©2018 Wantedly, Inc. => ϩάΛ׆༻͢Δ
©2018 Wantedly, Inc. ͨͩɺݱঢ়ͷϩάػߏෆຬ͕͋Γ·ͨ͠
©2018 Wantedly, Inc. 1. SwiftͰprint͔͠ͳ͍ͨΊɺ ϥΠϒϥϦͷඪ४ग़ྗίϯτϩʔϧෆՄೳ 2. ϩάϨϕϧ͕ͳ͍ͨΊɺ ͱΓ͋͑ͣprintͰݟͮΒ͘ͳͬͯ͘Δ ϩάػߏͷෆຬ
©2018 Wantedly, Inc. ϥΠϒϥϦͰղܾ͢Δʁ
©2018 Wantedly, Inc. ϩΪϯάͷϥΠϒϥϦ ͍͔ͭ͋͘Γ·͢
©2018 Wantedly, Inc. Swiftybeaver
©2018 Wantedly, Inc. Pros • 3500 Star • ϩάϨϕϧʹରԠ (verbose,
debug, info, warning, error) • ϑΝΠϧίϯιʔϧग़ྗͳͲඪ४Ͱ๛ͳग़ྗઌΦϓγϣϯΛ͍࣋ͬͯΔ • ϩάϨϕϧΛϑΟϧλϦϯάͰ͖ΔΞϓϦ͕͋Δ • ඇಉظͰͷग़ྗʹରԠ͍ͯ͠Δ • ϑΥʔϚοτͷઃఆ Swiftbeaver
©2018 Wantedly, Inc. Cons • ΞϓϦͰจࣈྻΛίϐϖͰ͖ͳ͍ • ༗ྉͷϓϥοτϑΥʔϜ͕͋Γɺྑ͘ѱ͘ϩοΫΠϯ͞ΕΔՄೳੑ͋Γ • ֓Ͷྑ͍͚ͲɺΠϯλʔϑΣΠε͕ඍົͳͱ͜Ζ͕͋Δ
Swiftbeaver
©2018 Wantedly, Inc. ཉ͔ͬͨ͠ͷΛཧ͢Δ
©2018 Wantedly, Inc. 1. ใͷ༏ઌҙຯ͚Λ͢ΔͨΊɺ ϩάϨϕϧ͕΄͍͠ • ඞཁʹԠͯ͡ϑΟϧλϦϯάͯ͠ɺඞཁͳใʹ؆୯ʹΞΫηε͍ͨ͠ 2. ग़ྗઌΛมߋՄೳʹ͍ͨ͠
• ֎෦ʹ͍͛ͨέʔε͕͋Δ • ϑΝΠϧग़ྗͯ͠֎෦ͰϑΟϧλϦϯά͍ͨ͠ ཉ͔ͬͨ͠ͷ
©2018 Wantedly, Inc. 3. σόοάͱϦϦʔεͰڍಈΛ ม͑ΒΕΔΑ͏ʹ͍ͨ͠ • ϦϦʔεςετͰͳʹ͠ͳ͍ͳͲΓସ͍͑ͨ ཉ͔ͬͨ͠ͷ
©2018 Wantedly, Inc. ͜Ε͘Β͍ͩͬͨΒ ࣗͰ͔͚Δ͔ʁ
©2018 Wantedly, Inc. LoggerProtocol
©2018 Wantedly, Inc. LoggerProtocol extension
©2018 Wantedly, Inc. LogContextProtocol and LogContext
©2018 Wantedly, Inc. Logger
©2018 Wantedly, Inc. LogLevel
©2018 Wantedly, Inc. LogDestinationProtocol and StandardOut
©2018 Wantedly, Inc. LogFormatterProtocol
©2018 Wantedly, Inc. ͜͜·Ͱ͕ϥΠϒϥϦίʔυ
©2018 Wantedly, Inc. ϓϩμΫτίʔυͰ ग़ྗઌͱϑΥʔϚολʔΛࢦఆ͢Δ
©2018 Wantedly, Inc. LogDestinationProtocol and StandardOut
©2018 Wantedly, Inc. logger
©2018 Wantedly, Inc. Console output
©2018 Wantedly, Inc. ·ͱΊ
©2018 Wantedly, Inc. 1. γϯϓϧͰ͑ͦ͏ͳͷ͕Ͱ͖ͨ 2. ·࣮ͩݱͰ͖͍ͯͳ͍͜ͱ͋Δ • ඇಉظͷग़ྗ •
ϑΟϧλϦϯάͷγΣϧεΫϦϓτ 3. ຊSwiftͷΤίγεςϜશମͰΘΕΔͷ ͕΄͍͠ʂ ·ͱΊ