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
680
Generating Accessibility Identifiers Easily and Consistently Using Reflection API
ngtk
3
640
プロダクト改善の施策を提案できるようになろう! / Let's be able to propose measures for product growth!
ngtk
14
37k
施策提案ワークショップ / Measures creation workshop
ngtk
3
35k
Swift API Design learning from Cocoa API changes
ngtk
0
840
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
490
Other Decks in Technology
See All in Technology
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
4.5k
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
470
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
9
120k
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
160
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
160
スプリントゴールにチームの状態も設定する背景とその効果 / Team state in sprint goals why and impact
kakehashi
2
100
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.6k
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
160
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
210
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
290k
Featured
See All Featured
Designing for humans not robots
tammielis
249
25k
Docker and Python
trallard
40
3.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Gamification - CAS2011
davidbonilla
80
5k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
290
How GitHub (no longer) Works
holman
311
140k
Navigating Team Friction
lara
183
14k
Ruby is Unlike a Banana
tanoku
96
11k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
A designer walks into a library…
pauljervisheath
202
24k
Code Review Best Practice
trishagee
64
17k
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ͷΤίγεςϜશମͰΘΕΔͷ ͕΄͍͠ʂ ·ͱΊ