1.0.0 âĸ Published 7 months ago
log101 v1.0.0
đ Console Logger Utility
A đ ī¸ simple and đ¨ customizable logging utility for styled đĨī¸ console messages. This utility provides predefined styles for different log đ levels (e.g., âšī¸ info
, â ī¸ warning
, đ¨ danger
, â error
, â
success
) and allows full đ ī¸ customization for additional ⥠flexibility.
đĨ Installation
Install the đĻ package via npm:
npm install log101
đąī¸ Usage
Import the package into your đĨī¸ project:
import log from "log101";
đ Logging with Predefined Styles
// â
Default style (đĸ green, đĸ bold, đ large text)
log("This is a default message");
// đ¨ Predefined styles for log đ levels
log("âšī¸ Information message", "info"); // đĩ Blue text for âšī¸ informational logs
log("â ī¸ Warning message", "warning"); // đ Orange text for â ī¸ warnings
log("đ¨ Critical issue detected!", "danger"); // đ´ Red text for đ¨ critical issues
log("â An error occurred!", "error"); // đ Dark đ´ red text for â errors
log("â
Operation was successful!", "success"); // đĸ Green text for â
success
đ ī¸ Logging with Custom Styles
You can pass a đ¨ custom style object to override the predefined styles:
log("đī¸ Custom styled message", {
color: "#FF5733",
fontSize: "18px",
fontWeight: "normal",
fontStyle: "italic"
});
đ¨ Predefined Styles
Style | đ Description |
---|---|
default | đĸ Green, đĸ bold, đ xx-large text |
info | đĩ Blue, đĩ bold, đ large text |
warning | đ Orange, đ bold, đ large text |
danger | đ´ Red, đ´ bold, đ large text |
error | đ Dark đ´ red, đ bold, đ large text |
success | đĸ Green, đĸ bold, đ large text |
đ¨ Dynamic CSS String
You can also pass a âī¸ raw CSS string if you prefer:
log("đŽ Direct CSS example", "color:purple;font-size:24px;font-weight:bold;text-decoration:underline");
đ License
This project is licensed under the âī¸ MIT License.
1.0.0
7 months ago