Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@exogee/logger

Package Overview
Dependencies
Maintainers
3
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exogee/logger - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

42

lib/index.js
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {

@@ -20,38 +14,6 @@ if (from && typeof from === "object" || typeof from === "function") {

};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// ../../packages/logger/src/index.ts
var src_exports = {};
__export(src_exports, {
logger: () => logger
});
module.exports = __toCommonJS(src_exports);
// ../../packages/logger/src/logger.ts
var import_bunyan = __toESM(require("bunyan"));
var validLevels = {
warn: true,
trace: true,
debug: true,
info: true,
error: true,
fatal: true
};
var level = process.env.LOGGING_LEVEL || "info";
if (!validLevels[level])
throw new Error(
`Invalid logging level ${level}, valid levels are ${Object.keys(validLevels).join(", ")}`
);
var logger = import_bunyan.default.createLogger({
name: "graphweaver",
level
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
logger
});
//# sourceMappingURL=index.js.map
__reExport(src_exports, require("./logger"), module.exports);

69

lib/logger.js

@@ -1,26 +0,51 @@

'use strict';
var __importDefault =
(this && this.__importDefault) ||
function (mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, '__esModule', { value: true });
exports.logger = void 0;
const bunyan_1 = __importDefault(require('bunyan'));
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var logger_exports = {};
__export(logger_exports, {
logger: () => logger
});
module.exports = __toCommonJS(logger_exports);
var import_bunyan = __toESM(require("bunyan"));
const validLevels = {
warn: true,
trace: true,
debug: true,
info: true,
error: true,
fatal: true,
warn: true,
trace: true,
debug: true,
info: true,
error: true,
fatal: true
};
const level = process.env.LOGGING_LEVEL || 'info';
const level = process.env.LOGGING_LEVEL || "info";
if (!validLevels[level])
throw new Error(
`Invalid logging level ${level}, valid levels are ${Object.keys(validLevels).join(', ')}`
);
exports.logger = bunyan_1.default.createLogger({
name: 'graphweaver',
level,
throw new Error(
`Invalid logging level ${level}, valid levels are ${Object.keys(validLevels).join(", ")}`
);
const logger = import_bunyan.default.createLogger({
name: "graphweaver",
level
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
logger
});
{
"name": "@exogee/logger",
"version": "0.1.0",
"version": "0.1.1",
"description": "Common logging output for Exogee projects",

@@ -19,8 +19,11 @@ "license": "MIT",

"@types/bunyan": "1.8.6",
"typescript": "4.5.5"
"esbuild": "0.15.5",
"typescript": "4.9.4"
},
"scripts": {
"build:legacy": "tsc --build",
"build:types": "tsc --emitDeclarationOnly"
"build": "npm run build:js && npm run build:types",
"build:js": "esbuild --outdir=lib --platform=node --format=cjs `find src \\( -name '*.ts' \\)`",
"build:types": "tsc --emitDeclarationOnly",
"version": "npm version --no-git-tag-version"
}
}
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