Socket
Socket
Sign inDemoInstall

@mmit/logging

Package Overview
Dependencies
1
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

2

lib/logging/LoggerFactory.d.ts

@@ -12,3 +12,3 @@ import { Channel } from './Channel';

static readonly loggers: LoggerImpl[];
static get(loggerName: string): Logger;
static getLogger(loggerName: string): Logger;
static for(loggerName: string): LoggerFactorySyntax;

@@ -15,0 +15,0 @@ }

@@ -13,3 +13,3 @@ "use strict";

class LoggerFactory {
static get(loggerName) {
static getLogger(loggerName) {
let found = this.loggers.find((logger) => logger.name === loggerName);

@@ -16,0 +16,0 @@ if (!found) {

{
"name": "@mmit/logging",
"author": "Mike Mitterer",
"version": "0.1.2",
"version": "0.1.3",
"description": "Minimal Logging framework",

@@ -6,0 +6,0 @@ "keywords": [

@@ -26,3 +26,3 @@ # Minimal TS Logging framework

const logger = LoggerFactory.get('test.Logger');
const logger = LoggerFactory.getLogger('test.Logger');

@@ -29,0 +29,0 @@ // Will not be shown

@@ -25,3 +25,3 @@ import { LoggerFactory } from '../main/logging/LoggerFactory';

LoggerFactory.defaultLevel = LogLevel.INFO;
const logger = LoggerFactory.get('main');
const logger = LoggerFactory.getLogger('main');

@@ -28,0 +28,0 @@ export function main(): void {

@@ -7,3 +7,3 @@ // Styles für die gesamte Web-App

function everythingIsReady(): void {
const logger = LoggerFactory.get('done');
const logger = LoggerFactory.getLogger('done');

@@ -15,3 +15,3 @@ logger.info(`everythingIsReady!`);

function domIsReady(): void {
const logger = LoggerFactory.get('done');
const logger = LoggerFactory.getLogger('done');

@@ -18,0 +18,0 @@ logger.info(`domIsReady!`);

@@ -19,3 +19,3 @@ import { ConsoleLogger } from '../channels/ConsoleLogger';

public static get(loggerName: string): Logger {
public static getLogger(loggerName: string): Logger {
let found = this.loggers.find((logger) => logger.name === loggerName);

@@ -22,0 +22,0 @@ if (!found) {

@@ -38,5 +38,5 @@ import 'jest-extended';

test('Add two Loggers with the same name', () => {
const logger1 = LoggerFactory.get('test.Logger');
const logger2 = LoggerFactory.get('test.Logger');
const logger3 = LoggerFactory.get('test.Logger.other');
const logger1 = LoggerFactory.getLogger('test.Logger');
const logger2 = LoggerFactory.getLogger('test.Logger');
const logger3 = LoggerFactory.getLogger('test.Logger.other');

@@ -75,3 +75,3 @@ expect(LoggerFactory.loggers.length).toBe(2);

test('Global Log-Level ist by default WARN', () => {
const logger = LoggerFactory.get('test.Logger');
const logger = LoggerFactory.getLogger('test.Logger');

@@ -91,3 +91,3 @@ logger.debug('Test - Debug');

LoggerFactory.defaultLevel = LogLevel.INFO;
const logger = LoggerFactory.get('test.Logger');
const logger = LoggerFactory.getLogger('test.Logger');

@@ -94,0 +94,0 @@ logger.debug('Test - Debug');

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc