
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
cinovo-logger-file
Advanced tools
___
__ /\_ \
___ /\_\ ___ ___ __ __ ___ \//\ \ ___ __ __ __ _ __
/'___\/\ \ /' _ `\ / __`\/\ \/\ \ / __`\ _______\ \ \ / __`\ /'_ `\ /'_ `\ /'__`\/\`'__\
/\ \__/\ \ \/\ \/\ \/\ \L\ \ \ \_/ |/\ \L\ \/\______\\_\ \_/\ \L\ \/\ \L\ \/\ \L\ \/\ __/\ \ \/
\ \____\\ \_\ \_\ \_\ \____/\ \___/ \ \____/\/______//\____\ \____/\ \____ \ \____ \ \____\\ \_\
\/____/ \/_/\/_/\/_/\/___/ \/__/ \/___/ \/____/\/___/ \/___L\ \/___L\ \/____/ \/_/
/\____/ /\____/
\_/__/ \_/__/
File endpoint for cinovo-logger.
npm install cinovo-logger
var logger = require("cinovo-logger");
npm install cinovo-logger-file
In your JavaScript code append the file endpoint.
logger.append(require("cinovo-logger-file")(true, true, true, true, "./log", "log", ".txt", 1, 60, 10));
logger.debug("all values are ok");
logger.info("myscript", "all values are ok");
logger.error("myscript", "some values are not ok", {a: 10, b: 20});
logger.exception("myscript", "some values are not ok", new Error("error"));
logger.critical("myscript", "all values are not ok", {a: 10, b: 20}, function(err) { ... });
Now you can log to file endpoint.
Async creates a file Endpoint.
debug
: Boolean - true if the endpoint should log debug levelinfo
: Boolean - true if the endpoint should log info levelerror
: Boolean - true if the endpoint should log error levelcritical
: Boolean - true if the endpoint should log critical leveldir
: String - directory in which log files are saved.filePrefix
: String -fileSuffix
: String -maxFileSize
: Number - bytesmaxFileAge
: Number - secondsmaxFiles
: Number - Maximum Number of files in dir (oldest are removed first)callback
: Function(err, endpoint) - fired if the endpoint is ready to use
err
: Error (optional)endpoint
: Endpoint - use the endpoint like this logger.append(endpoint)When the endpoint is stopped.
lastFile
: String - path and nameSomething went wrong in the background e.g. roll because of max age reached.
err
: ErrorFile was opened and is ready to be written.
file
: String - path and nameExample:
var endpoint = require("cinovo-logger-file")(true, true, true, true, "./log", "log", ".txt", 1, 60, 10);
endpoint.on("openFile", function(file) { ... });
logger.append(endpoint);
File was created and is ready to be written.
file
: String - path and nameExample:
var endpoint = require("cinovo-logger-file")(true, true, true, true, "./log", "log", ".txt", 1, 60, 10);
endpoint.on("createFile", function(file) { ... });
logger.append(endpoint);
If the file size gets to big or the file gets to old the current file is replaced with a new one. This is called a roll.
oldFile
: String - file that is too big or too old (path and name)newFile
: String - file ready to be written (path and name)Example:
var endpoint = require("cinovo-logger-file")(true, true, true, true, "./log", "log", ".txt", 1, 60, 10);
endpoint.on("closeFile", function(file) { ... });
logger.append(endpoint);
File was closed and is ready to be written.
file
: String - path and nameExample:
var endpoint = require("cinovo-logger-file")(true, true, true, true, "./log", "log", ".txt", 1, 60, 10);
endpoint.on("closeFile", function(file) { ... });
logger.append(endpoint);
If the log file can not be written as fast as you send logs. In this situation you are losing log entries!
If the log file can continue to be written.
FAQs
File endpoint for cinovo-logger.
The npm package cinovo-logger-file receives a total of 3 weekly downloads. As such, cinovo-logger-file popularity was classified as not popular.
We found that cinovo-logger-file 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.