A library to log for Scriptable.

Overview

scriptable-logger

Logger is a library to log for Scriptable.

Usage

const Logger = importModule('logger');

Logger.log('log');
// 'log' in white color.

Logger.warn('warn');
// 'warn' in orange color.

Logger.error('error');
// 'error' in red color.

Logger.assert(true, 'This message is\'nt shown.');
// (nothing is logged.)

Logger.assert(false, 'This message is shown.');
// 'This message is shown.'

Logger.group()
Logger.log('> level 1');
// '  > level 1'
Logger.group()
Logger.log('> level 2');
// '    level 2'
Logger.groupEnd()
Logger.log('< level 1');
// '  level 1'
Logger.groupEnd()

Logger.groupIndentation = 4;
Logger.group()
Logger.log('> Indents 4 spaces.');
Logger.groupEnd();


Logger.count();
// 'default: 1'
Logger.count();
// 'default: 2'
Logger.count('counter1');
// 'counter1: 1'
Logger.count('counter1');
// 'counter1: 2'

Logger.countReset();
// 'default: 0'
Logger.countReset('counter1');
// 'counter1: 0'

Logger.pretty({hello: 'world'});
// {
//   hello: "world"
// }
Logger.pretty({a: 'A', b: 'B'}, ['b'], '\t');
// {
// 	"b": "B"
// }

Logger.time();
Logger.time('timer1');

Logger.timeEnd();
// 'default: 0ms'
Timer.schedule(1000, 0, Logger.timeEnd.bind(this, 'timer1'));
// 'timer1: 1001ms'

Reference

See REFERENCE.md

License

MIT license

You might also like...

A simple to do list webpage where you can log the daily tasks you have to do, mark them as checked, modify them, reorder them and remove them. Made using HTML, CSS and JavaScript.

A simple to do list webpage where you can log the daily tasks you have to do, mark them as checked, modify them, reorder them and remove them.  Made using HTML, CSS and JavaScript.

To-Do-List This Webpage is for an app called To-Do-List which helps you add, remove or check tasks you have to do. It is a simple web page which conta

Mar 12, 2022

Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

hellog Your new logger ! hellog is a general-purpose logging library. It offers a console.log-like API and formatting, extensible type-safety colored

Jan 5, 2022

Benefit cards API, create and store card data and log transactions

Benefit cards API, create and store card data and log transactions

Valex 💳 Benefit cards for companies and employees! 💻 Tech used Overview An API to store benefit cards from companies to employees and log transactio

Apr 25, 2022

A full stack application that uses an authentication system to allow FAA Inspectors, Airliners, and Aircraft Technicians to update progress on their work all while keeping a log of records on projects completed.

A full stack application that uses an authentication system to allow FAA Inspectors, Airliners, and Aircraft Technicians to update progress on their work all while keeping a log of records on projects completed.

Jun 13, 2022

This code can be used to log activity on yours Polytoria Games.

This code can be used to log activity on yours Polytoria Games.

polyGameLogger This code can be used to log activity on yours Polytoria Games. current version: 0.1.1 Basic Setup First of all, you need to create a .

Jun 13, 2022

A progressive web app to help volunteers track their volunteering activities, register vet concerns and log incident reports.

POOPS - Pets of Older Persons 2022 Introduction This is a Next.js project bootstrapped with create-next-app. Getting Started First, install yarn: npm

Jan 3, 2023

Register your username, log into the app and create your list of a to-do with local storage.

Register your username, log into the app and create your list of a to-do with local storage.

Todofy Todofy is a web app to create your to-do list with local storage. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents

Jun 30, 2022

Style templates for console.log

Style templates for console.log

sttyl Style templates for console.log. Usage This module is primarily intended for Deno and browsers. import { sttyl } from "https://deno.land/x/sttyl

Dec 27, 2022
Releases(v1.1.0)
Owner
Kynako
Kynako
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Collection of Scriptable scripts.

Scriptable Scripts GitLab Contribution Graph A widget that shows an overview of your recent GitLab contributions. It is available in small and medium

Shahab 3 Nov 18, 2022
PoGOEvents is a Scriptable widget that displays current and upcoming Pokemon GO events.

PoGOEvents PoGOEvents is a Scriptable widget that displays current and upcoming Pokemon GO events. All event data is gathered from from ScrapedDuck, w

Anthony 33 Nov 12, 2022
Scriptable Widget which shows current news from tagesschau.de

tagesschau-widget for Scriptable Based on this reddit post of u/trbn_hck Unfortunately the Repositorie in his GitHub profile is no longer exist. Widge

Robinson 5 Sep 12, 2022
Use jsx to make scriptable's layout.

scriptable-jsx This project helps you to write Scriptable widgets with JSX syntax. And add some useful tools by the way. you can check demos in demo f

毛球 8 Oct 10, 2022
Console log to terminal

Termlog Console log to terminal What it does termlog send the browser console log to your terminal It also comes with a nodejs REPL so you can do some

Quang Ngoc 16 Jan 21, 2022
This is a full stack application where you can log all you places where you visited....-

Full Stack Travelling Log ?? ?? ✈️ This is a full stack application where you can log ✈️ your all places ?? ?? ?? you have visited .... ??️ ??️ ??️ Se

null 19 Sep 29, 2022
Chrome extension that uses vulnerabilities CVE-2021-33044 and CVE-2021-33045 to log in to Dahua cameras without authentication.

DahuaLoginBypass Chrome extension that uses vulnerability CVE-2021-33044 to log in to Dahua IP cameras and VTH/VTO (video intercom) devices without au

null 71 Nov 26, 2022
Get the last logs of your /var/log folder

var-log-crawler Get the last logs of your /var/log folder Requirements: Node installed. Hot to use: Rename .env.sample to .env and fill with your valu

David William Rigamonte 2 Jan 5, 2022