{"version":3,"sources":["jsdelivr-header.js","/npm/zk-logger@0.1.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,QAAU,QAAQ,WACxB,QAAQ,6BACR,MAAM,WAAa,QAAQ,WACrB,QAAU,QAAQ,OAAO,QACzB,UAAY,QAAQ,OAAO,UAC3B,MAAQ,QAAQ,OAAO,MACvB,OAAS,QAAQ,OAAO,OAExB,SAAW,QAAO,EACtB,QACA,UACA,QACA,eAEO,GAAG,MAAc,MAAU,MAAU,MAIxC,eAAiB,IAAK,QAAQ,WAA0B,gBAAE,CAC9D,SAAU,kBACV,MAAO,OACP,QAAS,SACT,YAAa,aAEb,QAAS,OACT,SAAU,QAON,OAAU,IACT,GAA0B,iBAAV,IACnB,MAAQ,iBAEH,QAAQ,aAAa,CAC1B,OAAQ,QACN,MAAM,CACJ,MAAO,IAET,YACA,UAEF,WAAY,CAAC,eAAgB,IAAI,WAAW,YAIhD,OAAO,QAAU","file":"/npm/zk-logger@0.1.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/zk-logger@0.1.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const winston = require('winston');\r\nrequire('winston-daily-rotate-file');\r\nconst transports = winston.transports;\r\nconst combine = winston.format.combine;\r\nconst timestamp = winston.format.timestamp;\r\nconst label = winston.format.label;\r\nconst printf = winston.format.printf;\r\n\r\nconst myFormat = printf(({\r\n  level,\r\n  message,\r\n  label,\r\n  timestamp\r\n}) => {\r\n  return `${timestamp} [${label}] ${level}: ${message}`;\r\n});\r\n\r\n\r\nconst transport_info = new (winston.transports.DailyRotateFile)({\r\n  filename: '%DATE%_info.log',\r\n  level: 'info',\r\n  dirname: \"./logs\",\r\n  datePattern: 'YYYY-MM-DD',\r\n  // zippedArchive: true,\r\n  maxSize: '500m',\r\n  maxFiles: '30d'\r\n});\r\n\r\n/**\r\n * \r\n * @param {string} labal \r\n */\r\nconst logger = (labal) => {\r\n  if (!labal || typeof labal !== 'string') {\r\n    labla = \"This project \"\r\n  }\r\n  return winston.createLogger({\r\n    format: combine(\r\n      label({\r\n        label: labal\r\n      }),\r\n      timestamp(),\r\n      myFormat\r\n    ),\r\n    transports: [transport_info, new transports.Console()]\r\n  });\r\n}\r\n\r\nmodule.exports = logger"]}