New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

better-logs

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-logs - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

5

controller.js

@@ -207,5 +207,4 @@ var _ = require('lodash');

var _refreshMorgan = function (opts) {
opts = Object.assign(opts || {}, {
stream: _getOutputStream('morgan', 'morgan')
});
opts = opts || {};
opts.stream = _getOutputStream('morgan', 'morgan')
morgan.token('datefmt', function () {

@@ -212,0 +211,0 @@ return datefmt(new Date(), _display.dateformat);

2

package.json
{
"name": "better-logs",
"version": "3.0.0",
"version": "3.0.1",
"description": "Really flexible and fast logger for web servers, applications and daemons",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -102,3 +102,3 @@ Even Better Logs for NodeJS

```
log.dateformat = 'HH:MM';
log.display('dateformat', 'HH:MM');
log.format('custom', '{{file}}:{{line}} custom: {{message}} {{timestamp}}');

@@ -117,5 +117,13 @@ ```

```
// Writes all logs to logs.txt (default is process.stdout)
log.output(fs.createWriteStream('logs.txt'));
// Writes all log.errors to ./error.log
log.output('error', './error.log');
// Writes all section logs to myWriteStream
log.output('section', myWriteStream);
log.output('section/error', myErrorStream); // Hides all log.error
// Writes all errors in section to myErrorStream
log.output('section/error', myErrorStream);
```

@@ -126,11 +134,5 @@

- `config(options)` - Takes an object of options. Valid properties are:
- `overrideConsole` (boolean) - allows the user to override the console to use `better-logs` instead.
- `showByDefault` (boolean) - show logs by default (if false, hides by default)
- `mode` (string) - active mode
- `modes` (object) - object where the key is the mode name, and the value is an object containing: `showByDefault`, `hide` and/or `show`.
- `hide([section])` - Hides all logs. If a section/group string is provided, it would only hide those logs.
- `show([section])` - Shows all logs. If a section/group string is provided, it would only show those logs.
- `reset()` - Resets all visibility back to its default state.
- `reset([section])` - Resets the visibility state back to the default inherited state. If a section/group string is provided, it would only reset those logs.
- `modes()` - Returns all defined modes

@@ -137,0 +139,0 @@ - `mode()` - Returns current active mode

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc