Socket
Socket
Sign inDemoInstall

@chia-carbon/core-registry-logger

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chia-carbon/core-registry-logger - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## [1.0.11](https://github.com/Chia-Network/core-registry-logger/compare/1.0.10...1.0.11) (2023-09-25)
### Features
* add namespace option ([25e9f90](https://github.com/Chia-Network/core-registry-logger/commit/25e9f9072b40a5950e44229690b92d0c7c989cda))
## [1.0.10](https://github.com/Chia-Network/core-registry-logger/compare/1.0.9...1.0.10) (2023-09-23)

@@ -2,0 +11,0 @@

21

index.js

@@ -14,2 +14,3 @@ const { createLogger, format, transports, addColors } = require("winston");

* @param {Object} options - Logger options
* @param {string} options.namespace - The Chia namespace for this project
* @param {string} options.projectName - The name of the project using the logger.

@@ -20,4 +21,20 @@ * @param {string} options.logLevel - The logging level.

constructor(options) {
const { projectName, logLevel, packageVersion } = options;
const { namespace, projectName, logLevel, packageVersion } = options;
if (!namespace) {
throw new Error("options.namespace is required");
}
if (!projectName) {
throw new Error("options.projectName is required");
}
if (!logLevel) {
throw new Error("options.logLevel is required");
}
if (!packageVersion) {
throw new Error("options.packageVersion is required");
}
const customLevels = {

@@ -49,3 +66,3 @@ levels: {

const chiaRoot = getChiaRoot();
const logDir = `${chiaRoot}/core-registry/logs/${projectName}`;
const logDir = `${chiaRoot}/${namespace}/logs/${projectName}`;

@@ -52,0 +69,0 @@ if (!fs.existsSync(logDir)) {

2

package.json
{
"name": "@chia-carbon/core-registry-logger",
"version": "1.0.10",
"version": "1.0.11",
"description": "Custom logger for core registry projects",

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

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