{"_id":"@elixxrades/marc","name":"@elixxrades/marc","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@elixxrades/marc","main":"build/marc.js","version":"1.0.0","devDependencies":{"@types/node":"^18.7.13"},"module":"build/marc.js","type":"module","dependencies":{"@types/express":"^4.17.13","chalk":"^5.0.1","express":"^4.18.1","fs":"^0.0.1-security","fs-extra":"^10.1.0"},"gitHead":"b3ead92eec81cd4bb0327195e458305ec1808675","description":"**MARC Readme.md**","_id":"@elixxrades/marc@1.0.0","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"integrity":"sha512-nsTG/Cxp5rxIULdnSri/3JuRRpDZB6xW2AZ6Lw9YuxJDrCLyJ2UYOVNPj+0+e/OyXp7dDHRw64USS7Wy2t//WA==","shasum":"27039656e81a306350c7a39470ea873973437323","tarball":"https://registry.npmjs.org/@elixxrades/marc/-/marc-1.0.0.tgz","fileCount":9,"unpackedSize":27755,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdxFfIxfPbVYcA4C7Um07aJeWNpURal3LItWJtsW8jiAiAXfZLosgSGQmSBwNepDp7YVOB/wiqy6JRkxk6Yzn4kcw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCgSkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYVA/+NUIwMVVWOsonmbwpVDOf2NeXjvXxEUEfSMvjpCWGrKzM76G7\r\n/gcEKVwNUd1lOR+feCA/DgNbCT+0Czw1oM1ZvmsJzx2c7ZAqtwqKgnwbaZGm\r\nEl9QTQ8IMLYRZTLqJGqpiI1o134tJPV4IF+QF9hc4vBx/f03DCuueIL3v9WN\r\nmazLhzran41WraYZ8URVNanvGtxtvDSJcU15D0rRvH/aUr6NGJt2aKPqGEi3\r\ng5DHS9Oxpeqo35Zq13/qXlQStvayyb7K5dWTI//n9ea3hJ+N+EujFKTR6y7j\r\nytDr7rlkayaqSwWMNJGWON/f5CXdbDmSWvoF3YEKlJb7na5EyU+mEkCb07K5\r\nx/I/7qUNtGr7MvVJBYZb559axQGLLWJA4+0l37mMyGVSIdl3UiOUQOrEjjKh\r\nJkyoo40le1eu45kplD3URGa+qgDwEA21jN/r6ineY2vEOfhvZPaA+4d+77Ju\r\nxlociCPAMHeffKlkZdALGMk+rWlJ6oeYj1pnULGJBpmWc3kf4+ABRJGSZ3CZ\r\nB4VL9a7aR2PmvnoNZoAbJlsJijIp9jwIFpYwmZE9VDog6WkPrv3DXQihL3om\r\n79PMQ6g1mdhed2XH61CJ/qBoI8jtDLD6bf8wLGGhUuQht8HXNe8Rifxhu0p1\r\nu6PuGTv1hKnikeY8+gylCXKPIILFB8AVnPk=\r\n=pft7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"elixxrades","email":"omerfarukaras62@gmail.com"},"directories":{},"maintainers":[{"name":"elixxrades","email":"omerfarukaras62@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/marc_1.0.0_1661600932116_0.10207646106145707"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-27T11:48:52.043Z","1.0.0":"2022-08-27T11:48:52.282Z","modified":"2022-08-27T11:48:52.418Z"},"maintainers":[{"name":"elixxrades","email":"omerfarukaras62@gmail.com"}],"description":"**MARC Readme.md**","readme":"**MARC Readme.md**\n\n* Marc is a functional logger.\n\n* Checkout test.js or test.ts\n\n* Example Code: \n* * Typescript\n```ts\nimport chalk from \"chalk\";\nimport MARC, { IOptions, ITypes } from \"./marc.js\";\nimport Express from \"express\"\n\nconst app = Express()\nconst marc = new MARC({\n  name: \"MARC\",                                     //* Logger Name\n  cleanUp: true,                                    //* Removes all log files then creates new ones instead. dont use with code folder all removes.\n  types: [{\n    name: \"TEST\",                                   //* Type Name Used at line:36\n    hexColor: chalk.bgBlueBright,                   //* Type Color \n    textSequence: \"\\\\/%N - %TP\\\\/ > \\\"%T\\\" > %D\",   /**\n     *? Text sequence.\n     * %TP Debug Type [Required]\n     * %N  Logger Name\n     * %T  Time\n     * %D  Data Text [Required]\n     *\n     * %PD Process ID (PID)\n     * %PP Process Platform\n     * %PA Process Arch\n     * %NV Node Version\n     * %PU Process User\n   */\n    textColor: chalk.bgRed                          //* Type Text Color\n  } as ITypes],\n  logDir: process.cwd() + \"/logs/\",                 //* Select Log directory\n  object2string: true,                              //* Converts objects to string \n  useDefaultTypes: true                             //* Use default types [INFO, DEBUG, ERROR]\n} as IOptions);\n\nvar testData = {\n  m: \"a\",\n  r: \"c\",\n  e: \"l\",\n  i: \"x\"\n};\n\nvar testFunc = function () {\n  console.log(\"testfcrunned\");\n};\n\n(async () => {\n  try {\n    await marc.start();\n    await marc.log(\"INFO\", \"info test\", testFunc);\n    await marc.log(\"DEBUG\", \"debug test\", testData, testFunc);\n    await marc.log(\"TEST\", \"ooOOOOOOoo\")\n  } catch (e) {\n    console.log(e)\n  }\n})();\n\napp.use(marc.express())\napp.get(\"/\", (req: Express.Request, res: Express.Response) => {\n  res.send(\"essa\")\n})\n\napp.listen(3000)\n```\n\n* * Javacript\n\n```js\nconst MARC = require(\"./build/marc.js\");\nconst chalk = require(\"chalk\");\n\nconst express = require(\"express\");\nconst app = express();\n\nconst marc = new MARC({\n  name: \"MARC\", //* Logger Name\n  cleanUp: true, //* Removes all log files then creates new ones instead. dont use with code folder all removes.\n  types: [\n    {\n      name: \"TEST\", //* Type Name Used at line:36\n      hexColor: chalk.bgBlueBright, //* Type Color\n      textSequence: '\\\\/%N - %TP\\\\/ > \"%T\" > %D',\n      /**\n       *? Text sequence.\n       * %TP Debug Type [Required]\n       * %N  Logger Name\n       * %T  Time\n       * %D  Data Text [Required]\n       *\n       * %PD Process ID (PID)\n       * %PP Process Platform\n       * %PA Process Arch\n       * %NV Node Version\n       * %PU Process User\n       */ textColor: chalk.bgRed, //* Type Text Color\n    },\n  ],\n  logDir: process.cwd() + \"/logs/\", //* Select Log directory\n  object2string: true, //* Converts objects to string\n  useDefaultTypes: true,\n});\n\nmarc.start();\n\nmarc.log(\"TEST\", \"Node Version\", process.version);\nmarc.log(\"INFO\", \"Arch\", process.arch);\nmarc.log(\"DEBUG\", \"Cpu Usage\", process.cpuUsage());\nmarc.log(\"ERROR\", \"Little Error\", process.ppid);\n\napp.use(marc.express());\napp.get(\"/\", (req, res) => {\n  res.send(\"essa\");\n});\n\napp.listen(3000);\n\n```","readmeFilename":"readme.md"}