Implementing LogService

Logging is an important ally that you want during the development lifecycle of your app as well as in production. It can help you debug as well as gain important insights into how your app is used. Having a single pathway to run all logging through also provides an opportunity to reroute all the app logs somewhere else with the flip of a switch. For example, you could use a third-party debug tracking service, such as TrackJS (https://trackjs.com), via Segment (https://segment.com). You will want to run a lot of important aspects of your app through logging and it serves as a great place to have a lot of control and flexibility. 

Let's open app/modules/core/services/log.service.ts and get to work. Let's start by defining ...

Get NativeScript for Angular Mobile Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.