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

@spinajs/internal-logger

Package Overview
Dependencies
Maintainers
1
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/internal-logger - npm Package Compare versions

Comparing version 1.2.12 to 1.2.14

46

lib/index.js
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var InternalLogger_1;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,6 +19,6 @@ exports.InternalLogger = void 0;

*/
class InternalLogger extends di_1.Bootstrapper {
let InternalLogger = InternalLogger_1 = class InternalLogger extends di_1.Bootstrapper {
bootstrap() {
const write = () => {
InternalLogger.LogBuffer.forEach((value, lName) => {
InternalLogger_1.LogBuffer.forEach((value, lName) => {
const logger = di_1.DI.resolve("__log__", [lName]);

@@ -34,3 +41,3 @@ if (logger) {

});
InternalLogger.LogBuffer.clear();
InternalLogger_1.LogBuffer.clear();
};

@@ -49,24 +56,24 @@ // when log system is resolved

static trace(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Trace, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Trace, name, ...args);
}
static debug(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Debug, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Debug, name, ...args);
}
static info(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Info, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Info, name, ...args);
}
static warn(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Warn, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Warn, name, ...args);
}
static error(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Error, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Error, name, ...args);
}
static fatal(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Fatal, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Fatal, name, ...args);
}
static security(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Security, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Security, name, ...args);
}
static success(err, message, name, ...args) {
InternalLogger.write(err, message, log_common_1.LogLevel.Success, name, ...args);
InternalLogger_1.write(err, message, log_common_1.LogLevel.Success, name, ...args);
}

@@ -94,20 +101,23 @@ static write(err, message, level, name, ...args) {

else {
InternalLogger.writeInternal(msg, logName);
InternalLogger_1.writeInternal(msg, logName);
}
}
else {
InternalLogger.writeInternal(msg, logName);
InternalLogger_1.writeInternal(msg, logName);
}
}
static writeInternal(msg, logName) {
if (InternalLogger.LogBuffer.has(logName)) {
InternalLogger.LogBuffer.get(logName).push(msg);
if (InternalLogger_1.LogBuffer.has(logName)) {
InternalLogger_1.LogBuffer.get(logName).push(msg);
}
else {
InternalLogger.LogBuffer.set(logName, [msg]);
InternalLogger_1.LogBuffer.set(logName, [msg]);
}
}
}
};
InternalLogger.LogBuffer = new Map();
InternalLogger = InternalLogger_1 = __decorate([
(0, di_1.Injectable)(di_1.Bootstrapper)
], InternalLogger);
exports.InternalLogger = InternalLogger;
InternalLogger.LogBuffer = new Map();
//# sourceMappingURL=index.js.map
{
"name": "@spinajs/internal-logger",
"version": "1.2.12",
"version": "1.2.14",
"description": "internal logger used by some packages. do not use it in production environment",

@@ -37,3 +37,3 @@ "homepage": "https://github.com/spinajs/main#readme",

},
"gitHead": "9102c6297adaadad8cb323738b5336d1014936b2"
"gitHead": "cd486feec1f81b84cc3646fc2dc1776be2b83fcb"
}

@@ -1,7 +0,7 @@

'use strict';
"use strict";
const internalLogger = require('..');
const internalLogger = require("..");
describe('@spinajs/internal-logger', () => {
it('needs tests');
describe("@spinajs/internal-logger", () => {
it("needs tests");
});

Sorry, the diff of this file is not supported yet

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