
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
examplify-log
Advanced tools
Just a very simple logging module for your Electron or NW.js application. No dependencies. No complicated configuration. Just require and use. Also it can be used without Electron.
By default it writes logs to the following locations:
~/.config/<app name>/log.log~/Library/Logs/<app name>/log.log%USERPROFILE%\AppData\Roaming\<app name>\log.logInstall with npm:
npm install electron-log
var log = require('electron-log');
log.info('Hello, log');
Transport is a simple function which requires an object which describes a message. By default, two transports are active: console and file. The file path is dependent on current platform.
log.transports.file = false;
log.transports.console = false;
log.transports.console = function(msg) {
console.log(`[${msg.date.toLocaleTimeString()} ${msg.level}] ${msg.text}`);
};
// Log level
log.transports.console.level = 'warn';
/**
* Set output format template. Available variables:
* Main: {level}, {text}
* Date: {y},{m},{d},{h},{i},{s},{ms}
*/
log.transports.console.format = '{h}:{i}:{s}:{ms} {text}';
// Set a function which formats output
log.transports.console.format = (msg) => msg.text;
// Same as for console transport
log.transports.file.level = 'warn';
log.transports.file.format = '{h}:{i}:{s}:{ms} {text}';
// Set maximum log size in bytes. When it exceeds, old log will be saved
// as log.old.log file
log.transports.file.maxSize = 5 * 1024 * 1024;
// Write to this file, must be set before first logging
log.transports.file.file = __dirname + '/log.txt';
// fs.createWriteStream options, must be set before first logging
log.transports.file.streamConfig = { flags: 'w' };
// set existed file stream
log.transports.file.stream = fs.createWriteStream('log.txt');
By default, file transport reads a productName or name property from package.json to
determine a log path like ~/.config/<app name>/log.log.
If you have no package.json or you want to specify another ,
just set the appName property:
log.appName = 'test';
1.3.0
1.2.0
1.0.16
Licensed under MIT.
FAQs
Just a very simple logging module for Examplify
We found that examplify-log 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 discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.