1.2.0 • Published 1 year ago

@leanylabs/logger v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Usage

You have two ways to use the lib:

  1. With default env variables name (which are: LOGGING_LEVEL, SERVICE_NAME and isProd which depends on NODE_ENV either including partial string 'prod' or not), the values of the variables must be defined in your process enviroment
const { logger } = require("@leanylabs/logger");

logger.info("hello world");
  1. Pass the needed variables manually into initially imported function 'createLogger' and then by means of in create the logger itself
const { createLogger } = require("@leanylabs/logger");

const logger = createLogger({
  isProduction: false,
  level: "silly",
  labels: {
    serviceName: "test",
  },
});
1.2.0

1 year ago

1.1.0

1 year ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago