@phoenix-labs/log-service

Common log service

Usage no npm install needed!

<script type="module">
  import phoenixLabsLogService from 'https://cdn.skypack.dev/@phoenix-labs/log-service';
</script>

README

log-service

Common log service

Environment variables required

  • LOG_LEVEL - specify the default winston log level

  • NODE_ENV - to change the winston log transport based on production and non-production environment

  • LOGSTASH_CONFIG - configuration for logstash host

        {
          port: your logstash port,
          host: "your-logstash-host",
          ssl_enable: true,
          max_connect_retries: -1,
        }
    

Config

Ex.

{
    serviceName: "service name not specified",
    level: "info",
    fmt: winston.format.combine(...)
  }
  • serviceName: the name of the service currently using this logger
  • level? : level of logging
  • fmt? : winston fmt object override