Giter VIP home page Giter VIP logo

loggy's Introduction

A simple console logging library for deno. Like...really simple.

GitHub GitHub issues GitHub last commit (by committer) Static Badge


This repository exists to allow me to learn how to make modules with deno. I do not expect anyone to use it but if you do...let me know!

Preview

Usage

Quickstart

Simply import the module.

import * as loggy from "https://deno.land/x/[email protected]/main.ts";

loggy by example

The code below...

import * as loggy from "https://deno.land/x/[email protected]/main.ts";

loggy.log("This is a standard log message.");
loggy.success("And this is a log message with a success status message.");
loggy.fail("Uh oh, something failed here.");
loggy.critical("Oops, a critical task failed!");
loggy.info("Loggy makes it easy to communicate events to developers.");
loggy.info("By utilizing the different status types loggy includes, you can");
loggy.info("make your important messages stand out without compromising log output.");

...will create this output!

Check the automatically generated documentation for more logging options.

loggy's People

Contributors

yeenbean avatar

Watchers

 avatar

loggy's Issues

Shorten status indicators to leave more room for logged messages

At the moment, status messages take up 7 characters of console width. This is a lot, especially if a console's width is limited to 80 characters. Think of the embedded devices!

I propose we shorten status messages to save space and improve visual clarity. Here are some examples of what I have in mind:

[+] Positive change.
[-] Negative change.
[ ] Generic log message.
    Alternative generic log message (notice how there's no status but message is still aligned).
[!] Critical event.
[i] Informational message.
[E] Error.

*Note that timestamps have been omitted in the examples above.

Add debug log type

Can have status of DBG and all text can be gray so that typical log output stands out from the debug output.

Optionally disable time

This will require making a decision. Either I can make an optional parameter for logging functions to enable/disable time output, or restructure the module as a class with a constructor to define options during initialization... ๐Ÿค”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.