Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Yet another simple logger
Kento Nagata
April 19, 2018
Technology
2
1.6k
Yet another simple logger
Kento Nagata
April 19, 2018
Tweet
Share
More Decks by Kento Nagata
See All by Kento Nagata
Generating Accessibility Identifiers Easily and Consistently Using Reflection API
ngtk
3
520
プロダクト改善の施策を提案できるようになろう! / Let's be able to propose measures for product growth!
ngtk
12
26k
施策提案ワークショップ / Measures creation workshop
ngtk
2
24k
Swift API Design learning from Cocoa API changes
ngtk
0
600
Page Object Pattern with XCUITest
ngtk
6
1.8k
Atomic Design の導入と実践プロセス
ngtk
4
1.5k
Share Xcode Templates with team
ngtk
2
1k
Read the release note of Rails 5.2
ngtk
0
300
Readable RSpec
ngtk
1
280
Other Decks in Technology
See All in Technology
Oktaの管理者権限を適切に移譲してみた
shimosyan
2
260
Astroで始める爆速個人サイト開発
takanorip
12
8.5k
私見「UNIXの考え方」/20230124-kameda-unix-phylosophy
opelab
0
160
re:Inventで発表があったIoT事例の紹介と考察
kizawa2020
0
170
ECテックカンファレンス2023 EC事業部のモバイル開発2023
tatsumi0000
0
180
もし本番ネットワークをまるごと仮想環境に”コピー”できたらうれしいですか? / janog51
corestate55
0
340
日経電子版だけじゃない! 日経の新規Webメディアの開発 - NIKKEI Tech Talk #3
sztm
0
150
ステート管理を超えるRecoil運用の考え方
uhyo
7
5.6k
GraphQLスキーマ設計の勘所
yukukotani
26
6.1k
Raspberry Pi Camera 3 介紹
piepie_tw
PRO
0
130
OCI技術資料 : ロード・バランサー 詳細 / Load Balancer 200
ocise
2
7.1k
ChatGPT for Hacking
anugrahsr
0
3.4k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
57
6.6k
Building a Scalable Design System with Sketch
lauravandoore
451
31k
Side Projects
sachag
451
37k
The Power of CSS Pseudo Elements
geoffreycrofte
52
4.3k
Navigating Team Friction
lara
176
12k
GitHub's CSS Performance
jonrohan
1020
430k
Robots, Beer and Maslow
schacon
154
7.3k
The Mythical Team-Month
searls
210
40k
We Have a Design System, Now What?
morganepeng
37
5.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
152
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
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ͷΤίγεςϜશମͰΘΕΔͷ ͕΄͍͠ʂ ·ͱΊ