1.0.1 • Published 3 years ago

logzone v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

logzone 🍭

a package to print pretty log messages. you can use predefined or customize your own!

npm npm.io

Installation ⚙️

npm install logzone
or
yarn add logzone

Methodes

the package has some built-in methods, the below graph explains them with the arguments.

MethodDescriptionarguments
logthe method you can use for customization your log.log(msg, color, background , fontSize) - msg: the log message - required. - color: log text color - optional - type: string - default: "". - background: log background color - optional - type: string - default: "". - fontSize: log font size in px - optional - type: accept both number or string - default: browser default.
successpredefined method for success logs.success(msg, fontSize) - msg: the log message - required. - fontSize: log font size in px - optional - type: accept both number or string - default: browser default.
infopredefined method for info logs.info(msg, fontSize) - msg: the log message - required. - fontSize: log font size in px - optional - type: accept both number or string - default: browser default.
warningpredefined method for warning logs.warning(msg, fontSize) - msg: the log message - required. - fontSize: log font size in px - optional - type: accept both number or string - default: browser default.
dangerpredefined method for error logs.danger(msg, fontSize) - msg: the log message - required. - fontSize: log font size in px - optional - type: accept both number or string - default: browser default.

Feel free to open a pull requests and add your favorite theme too.

Examples...

ES.Next

import { log, success, info, warning, danger } from "logzone";

log("I'm customizable log!", "black", "red", 25 );

success("I'm predefined logzone baby success log!");
success("I'm predefined logzone baby success log, with custom font size!", 14);

info("I'm predefined logzone baby info log!");
info("I'm predefined logzone baby info log, with custom font size!", 14);

warning("I'm predefined logzone baby warning log!");
warning("I'm predefined logzone baby warning log, with custom font size!",14);

danger("I'm predefined logzone baby danger log!");
danger("I'm predefined logzone baby danger log, with custom font size!", 14);

Old School

<!-- Include latest version from  https://www.jsdelivr.com/package/npm/logzone -->
<script src="https://cdn.jsdelivr.net/npm/logzone@1.0.0/dist/logzone.min.js"></script>

<script>
    logzone.log("I'm customizable log!", "black", "red", 25);
    logzone.success("I'm predefined logzone baby success log!");
    logzone.success("I'm predefined logzone baby success log, with custom font size!", 14);

    logzone.info("I'm predefined logzone baby info log!");
    logzone.info("I'm predefined logzone baby info log, with custom font size!", 14);

    logzone.warning("I'm predefined logzone baby warning log!");
    logzone.warning("I'm predefined logzone baby warning log, with custom font size!", 14);

    logzone.danger("I'm predefined logzone baby danger log!");
    logzone.danger("I'm predefined logzone baby danger log, with custom font size!", 14);
</script>

One Result! 🔥

Examples Links

Todo ✔️

  • add init() method.
  • add more themes.
  • tailwind colors utils compatibility.
  • add React hook.
1.0.1

3 years ago

1.0.0

3 years ago

0.0.14-0

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.0

3 years ago