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
690
Generating Accessibility Identifiers Easily and Consistently Using Reflection API
ngtk
3
650
プロダクト改善の施策を提案できるようになろう! / Let's be able to propose measures for product growth!
ngtk
14
38k
施策提案ワークショップ / 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
500
Other Decks in Technology
See All in Technology
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
120
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
430
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
Can We Measure Developer Productivity?
ewolff
1
150
Engineer Career Talk
lycorp_recruit_jp
0
190
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
760
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
プロダクト活用度で見えた真実 ホリゾンタルSaaSでの顧客解像度の高め方
tadaken3
0
180
Featured
See All Featured
BBQ
matthewcrist
85
9.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Visualization
eitanlees
145
15k
Into the Great Unknown - MozCon
thekraken
32
1.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Raft: Consensus for Rubyists
vanstee
136
6.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
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ͷΤίγεςϜશମͰΘΕΔͷ ͕΄͍͠ʂ ·ͱΊ