![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
[![Latest Stable Version](https://img.shields.io/npm/v/jlogger.svg)](https://www.npmjs.com/package/jlogger) [![License](https://img.shields.io/npm/l/jlogger.svg)](https://www.npmjs.com/package/jlogger) [![NPM Downloads](https://img.shields.io/npm/dt/jlogg
##Installation
$ npm install --save jlogger
A simple logger inspired by Android LogCat for NodeJS.
This logger provides functions like Log.e(), Log.w(), Log.i() and Log.d() as in Android App Development.
The display is as
##Usage
var Log = require('jlogger');
Log.addGlobalConfig("defaultTag", "defaultTag"); //Default tag for every log
var TAG = "some TAG";
Log.e(TAG, "your msg"); //This msg will be in red
Log.error(TAG, "your msg"); //This msg will be in red
Log.w(TAG, "msg"); //In yellow
Log.warn(TAG, "msg"); //In yellow
Log.i(TAG, "msg"); //In green
Log.info(TAG, "msg"); //In green
Log.d(TAG, "msg"); //This is white
Log.d("blue", TAG, "msg"); //Specify color
Log.debug(color, TAG, "msg"); //Specify color. Default is white
Log.hr(length); //Draw a dashed horizontal line. Default length is that of the terminal
If you want a new instance of the Logger, having different properties from global config use:
var Log = require('jlogger');
var Log2 = new Log.Logger({"defaultTag": "another default tag"});
Log2.e(TAG, "Another instance of logger");
// or
Log.e("Msg with default TAG");
Log.setGlobalConfig({
"defaultTag": "<your default tag name>", //Default tag for when tag is not specified
"tagBold": <true/false>, //If true then tags will be in bold,
"hrLength": <length of hr>, //Default length of horizontal line. If not specified then it fits to terminal size
"hrChar": "=", //Draw horizontal line with specified character. Default is "-"
"adaptScreenSize": <true/false>, //If true then hr width will fit the current terminal size
"projectName": "<your project name>", //Display this in your log
"showProjectName": <true/false>, //If false then project name is not printing in log. Default is true
});
Log.hr(length, showTimestamp, color, tag, char);
length: Number Number of characters to draw. Default is set by global Config
showTimeStamp: true/false Whether to show timestamp. Default is false
color: color name Color for the horizontal line
tag: tag tag for hr
char: "=" String with which the hr is to be drawn. (tag parameter should be present, atleast an empty placeholder)
###JSON formatting
No need to stringify the json to display. The module displays it with correct indentation.
var obj = {
name: "Jibin Mathews",
email: "jibinmathews7@gmail.com"
};
Log.e(TAG, obj);
or
Log.d("blue", TAG, obj);
##Release Notes
FAQs
A simple logger inspired by Android LogCat for NodeJS.
The npm package jlogger receives a total of 7 weekly downloads. As such, jlogger popularity was classified as not popular.
We found that jlogger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.