{"_id":"winston-error-format","_rev":"6-d5e3f35f7042e447cfb751cd6aad5c64","name":"winston-error-format","dist-tags":{"latest":"3.0.2"},"versions":{"0.0.1":{"name":"winston-error-format","version":"0.0.1","keywords":["browser","console","error","error-handler","error-handling","error-monitoring","format","formatter","http","javascript","library","log","logger","logger-middleware","logging","nodejs","typescript","winston","winston-logger","winstonjs"],"author":{"url":"https://github.com/ehmicky","name":"ehmicky","email":"ehmicky@gmail.com"},"license":"MIT","_id":"winston-error-format@0.0.1","maintainers":[{"name":"ehmicky","email":"ehmicky@gmail.com"}],"homepage":"https://www.github.com/ehmicky/winston-error-format","bugs":{"url":"https://github.com/ehmicky/winston-error-format/issues"},"dist":{"shasum":"c9a9dda58325ad3a3505c2ec4f9535b55082009e","tarball":"https://registry.npmjs.org/winston-error-format/-/winston-error-format-0.0.1.tgz","fileCount":8,"integrity":"sha512-Z1tZpy9GLxUWqWFGURFjtIdPVR5G1HsRoOzKcII9y4/F74kayjtEDb5rA0g565Oh8YYrIcPRqGq81BE28MTbMg==","signatures":[{"sig":"MEYCIQDzoZikwqqN9f964/mHDM2sVDSnjcMLW6VUFGJ8n3ERHQIhAOFkMnWFHmKLSvLyzEC3XYx3AtS7CTer0faOwY2K2eVb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfkQ+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoG5w/7BHpB7s/J1meqIgNOKDLCT1EFgMFy+n9es1eJt0ZDTj1qomCO\r\nbabro7ivZcHfzhSWA2rnK9zj2S5OypQWUR/naeookYWngUichEwtGv0mjWwk\r\nTtzkF4RKs8r49iq06JL5n+R4M6/ynRc7V8tFXMqlqjwk2v/SRP2Sg+ZOHmHO\r\ng8+ayi/RX6ty8MIbRfFwKCCFJ6sAgLSiPij7NsY5g4CPofaen+nkvswxRhk6\r\nmHWPi26Z7aKAZMGxVmf5hhtwnP11uyuEnry3hUPaPv4x77kPNLjMHzShH648\r\ntnTLwQyjrQ2Un0uM3qe8cqMRb7s69NR0B3NjQgeOLc6F2TM3cn0MhMcRAmxC\r\nkocUSv8MQ8wy2d4x206c5enmfDUv9Es6BnV/7tdxxTlZlMdq9P7CDFNM/Qum\r\nQz0O7SE70fKXI4C8tisRIe/j9VZ8eFYAD/0t0IXDbC+8Xfwq15Hbq/0d1AAa\r\nUGO+87OKiSStfyPjrlody28nWXHRcODR3lV5JQiIOE3oSLq8Jled2boT7lY6\r\nakj3sAZSvsT35kSlblVqqrk+1cZpENgltoSETYA4roclY5HwjICeERHJ5KHD\r\n971/a/q4M4tDg7+xEDDJjkJEbcsb0o9lQQdn4szT35c7x9I2cpVjfRP6Nfng\r\nG0rblMUkSxi0xN5jRR35phWcMUkgVQPBX2U=\r\n=AyOd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./build/src/main.js","type":"module","types":"./build/types/main.d.ts","engines":{"node":">=14.18.0"},"exports":{"types":"./build/types/main.d.ts","default":"./build/src/main.js"},"gitHead":"6432ace0204cba81b0eff8de6a173237b064d04d","scripts":{"test":"gulp test"},"_npmUser":{"name":"ehmicky","email":"ehmicky@gmail.com"},"repository":{"url":"git+https://github.com/ehmicky/winston-error-format.git","type":"git"},"_npmVersion":"9.1.2","description":"Log errors with Winston","directories":{"lib":"src","test":"test"},"sideEffects":false,"_nodeVersion":"19.1.0","dependencies":{"logform":"^2.4.2","triple-beam":"^1.3.0","is-plain-obj":"^4.1.0","safe-json-value":"^1.10.0","error-serializer":"^5.0.0","is-error-instance":"^1.3.0","normalize-exception":"^2.11.0"},"_hasShrinkwrap":false,"devDependencies":{"test-each":"^5.6.0","@ehmicky/dev-tasks":"^1.0.102"},"peerDependencies":{"winston":"^3.8.2"},"_npmOperationalInternal":{"tmp":"tmp/winston-error-format_0.0.1_1669219390169_0.2571484587453938","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"winston-error-format","version":"1.0.0","keywords":["browser","console","error","error-handler","error-handling","error-monitoring","format","formatter","http","javascript","library","log","logger","logger-middleware","logging","nodejs","typescript","winston","winston-logger","winstonjs"],"author":{"url":"https://github.com/ehmicky","name":"ehmicky","email":"ehmicky@gmail.com"},"license":"MIT","_id":"winston-error-format@1.0.0","maintainers":[{"name":"ehmicky","email":"ehmicky@gmail.com"}],"homepage":"https://www.github.com/ehmicky/winston-error-format","bugs":{"url":"https://github.com/ehmicky/winston-error-format/issues"},"dist":{"shasum":"007d099ff4a51c139e25906b8ac4b0fa3fee55a0","tarball":"https://registry.npmjs.org/winston-error-format/-/winston-error-format-1.0.0.tgz","fileCount":8,"integrity":"sha512-lz/P3ouhenuhNIDsCQomS7JNEt2UXx3jUBDeLcRFVjErGqb8WyfgIdPsq1Ij7P+OTyFvJcqLGe9e00vkD9XMPw==","signatures":[{"sig":"MEUCIAapQD/FH2YlSvS6fk3EA/H05zBmSB1Rpikn9K+F8WmtAiEA5dgbfPK8CT1vhMrdiWxbSdp8dRK/ZpmuowBPDY8ooOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfkRPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2Lg/+PzcBdBAYaXUV5qKkDNYshNM6Rxexx7t0jODWkMwfvGoouqq9\r\n/uJASAneMeMucC3r9/YUwQ547VoBva3CJX1odiYf15FS0XNIfNUhEgQEFSPZ\r\n2xrd06k8hG3P2ii78C470IJYkRSa6Rz7CmEUBNTEPyiFbyRD8wPeh/wjM4ku\r\ncrFSpmZ1rYRroAH7tlxzVEnjVeq/E2Ab04Y+I2bR79BsW3QfEMCOxsE13VgS\r\nHOY5NUoxAYtGZURW/5yH7jWfPkoG+tHV6r+1NHGX8Q2DQPXhgbFEZLe60ErR\r\nNjsRLZ+0eaWY44oVrqqPylwsITBp0fnWN+cVsdRhCmWr11V3zCcJrLetBzT4\r\nHKnmsO9q77iwJyNGrtn5ubp9Fdklaxz0xtK872+2nwCdGCwbmfZeqQ+SOdza\r\nZ2gkVtUMT+mBnxtnVe75KWKQburSM8DPHbygAgsgFiNWn68XLwMD/qcJzntR\r\nmDM1QpNL3LQGuXzV/ZWNj8DC8ZNwg+yoILrzN3MG9GPZbZ5XfwsIAd0a8NFI\r\n14LJIswOFBoJlN6wi6JJy24k1cshQDENbG4vtfU080wCt6uAL3EaKCNVwzEK\r\nX5ILFu/sE9rN41CwxGNc8417WorsK0tGP+kwU1vlr4BQhfWqhZLQd72YRZDq\r\nxVNLOFD43CzIC7EEiCcsLssL8MV8ojnAQ7U=\r\n=YmCu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./build/src/main.js","type":"module","types":"./build/types/main.d.ts","engines":{"node":">=14.18.0"},"exports":{"types":"./build/types/main.d.ts","default":"./build/src/main.js"},"gitHead":"874698abccf4b6740fd0d1e5c110762b1b3a23f5","scripts":{"test":"gulp test"},"_npmUser":{"name":"ehmicky","email":"ehmicky@gmail.com"},"repository":{"url":"git+https://github.com/ehmicky/winston-error-format.git","type":"git"},"_npmVersion":"9.1.2","description":"Log errors with Winston","directories":{"lib":"src","test":"test"},"sideEffects":false,"_nodeVersion":"19.1.0","dependencies":{"logform":"^2.4.2","triple-beam":"^1.3.0","is-plain-obj":"^4.1.0","safe-json-value":"^1.10.0","error-serializer":"^5.0.0","is-error-instance":"^1.3.0","normalize-exception":"^2.11.0"},"_hasShrinkwrap":false,"devDependencies":{"test-each":"^5.6.0","@ehmicky/dev-tasks":"^1.0.102"},"peerDependencies":{"winston":"^3.8.2"},"_npmOperationalInternal":{"tmp":"tmp/winston-error-format_1.0.0_1669219406842_0.6533986522917568","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"winston-error-format","version":"2.0.0","keywords":["browser","console","error","error-handler","error-handling","error-monitoring","format","formatter","http","javascript","library","log","logger","logger-middleware","logging","nodejs","typescript","winston","winston-logger","winstonjs"],"author":{"url":"https://github.com/ehmicky","name":"ehmicky","email":"ehmicky@gmail.com"},"license":"MIT","_id":"winston-error-format@2.0.0","maintainers":[{"name":"ehmicky","email":"ehmicky@gmail.com"}],"homepage":"https://www.github.com/ehmicky/winston-error-format","bugs":{"url":"https://github.com/ehmicky/winston-error-format/issues"},"dist":{"shasum":"ad2b33520b8d1a77b6daf02667a31b3f48966eda","tarball":"https://registry.npmjs.org/winston-error-format/-/winston-error-format-2.0.0.tgz","fileCount":8,"integrity":"sha512-1/x1VfKXef/6wFFeMsrdbjz44lJGHJHzy/VQe89oDE4CikRQ5Y31ewNt4u9g4+lpEbacPOtNAF2MPS0vxc+ZRQ==","signatures":[{"sig":"MEUCICRWMyXPCEXyR+tlmJH7NkMA0ncjxMQQNzVowGI1hZOFAiEA6I57aCl6FqPDMBMEoQY+uWibwD7f+Y6x5MuJXFoA2Pc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19309},"main":"./build/src/main.js","type":"module","types":"./build/src/main.d.ts","engines":{"node":">=16.17.0"},"exports":{"types":"./build/src/main.d.ts","default":"./build/src/main.js"},"gitHead":"23651d4121c29afc9d8944b4cacd8d242c143ba8","scripts":{"test":"gulp test"},"_npmUser":{"name":"ehmicky","email":"ehmicky@gmail.com"},"repository":{"url":"git+https://github.com/ehmicky/winston-error-format.git","type":"git"},"_npmVersion":"9.6.6","description":"Log errors with Winston","directories":{"lib":"src"},"sideEffects":false,"_nodeVersion":"20.1.0","dependencies":{"logform":"^2.5.1","triple-beam":"^1.3.0","is-plain-obj":"^4.1.0","safe-json-value":"^2.0.1","error-serializer":"^6.0.1","is-error-instance":"^2.0.0","normalize-exception":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"test-each":"^6.0.1","@ehmicky/dev-tasks":"^2.0.80"},"peerDependencies":{"winston":"^3.8.2"},"_npmOperationalInternal":{"tmp":"tmp/winston-error-format_2.0.0_1684024281739_0.08692549229075341","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"winston-error-format","version":"3.0.0","keywords":["browser","console","error","error-handler","error-handling","error-monitoring","format","formatter","http","javascript","library","log","logger","logger-middleware","logging","nodejs","typescript","winston","winston-logger","winstonjs"],"author":{"url":"https://github.com/ehmicky","name":"ehmicky","email":"ehmicky@gmail.com"},"license":"MIT","_id":"winston-error-format@3.0.0","maintainers":[{"name":"ehmicky","email":"ehmicky@gmail.com"}],"homepage":"https://www.github.com/ehmicky/winston-error-format","bugs":{"url":"https://github.com/ehmicky/winston-error-format/issues"},"dist":{"shasum":"e49a795685c84323bb04b6797876d2fafc38b12e","tarball":"https://registry.npmjs.org/winston-error-format/-/winston-error-format-3.0.0.tgz","fileCount":8,"integrity":"sha512-H1/NkDHFLLtyEh15V+q5g0nzCjtkq8C454g6zpS1kcDbABbs7iaXIoMXNA+o9Qz1UU5rgF3cC6gw1h/aPXa5jw==","signatures":[{"sig":"MEQCIHNV5n56RSPKc5rnKBGxFogtN3YNTJ4BcBqTDMIG3GquAiAak9/5ljsA6D8LLTcRNXR3a4/LCvSu5uukuZKvrAtEDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19785},"main":"./build/src/main.js","type":"module","types":"./build/src/main.d.ts","engines":{"node":">=18.18.0"},"exports":{"types":"./build/src/main.d.ts","default":"./build/src/main.js"},"gitHead":"19f22a1542abd05e389e71af6b8d8c6b7df90243","scripts":{"test":"gulp test"},"_npmUser":{"name":"ehmicky","email":"ehmicky@gmail.com"},"repository":{"url":"git+https://github.com/ehmicky/winston-error-format.git","type":"git"},"_npmVersion":"10.2.1","description":"Log errors with Winston","directories":{"lib":"src"},"sideEffects":false,"_nodeVersion":"21.1.0","dependencies":{"logform":"^2.6.0","triple-beam":"^1.4.1","is-plain-obj":"^4.1.0","safe-json-value":"^3.0.0","error-serializer":"^7.0.0","is-error-instance":"^3.0.0","normalize-exception":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"test-each":"^7.0.0","@ehmicky/dev-tasks":"^2.0.102"},"peerDependencies":{"winston":"^3.11.0"},"_npmOperationalInternal":{"tmp":"tmp/winston-error-format_3.0.0_1698532561203_0.48543662940373666","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"winston-error-format","version":"3.0.1","keywords":["browser","console","error","error-handler","error-handling","error-monitoring","format","formatter","http","javascript","library","log","logger","logger-middleware","logging","nodejs","typescript","winston","winston-logger","winstonjs"],"author":{"url":"https://github.com/ehmicky","name":"ehmicky","email":"ehmicky@gmail.com"},"license":"MIT","_id":"winston-error-format@3.0.1","maintainers":[{"name":"ehmicky","email":"ehmicky@gmail.com"}],"homepage":"https://www.github.com/ehmicky/winston-error-format","bugs":{"url":"https://github.com/ehmicky/winston-error-format/issues"},"dist":{"shasum":"b6a771131ce241ef6596aa81af08dd2db982b8e6","tarball":"https://registry.npmjs.org/winston-error-format/-/winston-error-format-3.0.1.tgz","fileCount":8,"integrity":"sha512-1aQWPl3aZNJrPjb2vwAHSoZuKaXcC3kT7h013PaXSpVgwtHj8g3cZfVVhKRxE8pLUJsIQeGvuAhuwlCWlbhPAg==","signatures":[{"sig":"MEQCICPFgYrUhV8Lo9Bxti2D4a1w4XMuKkb7A1g9x+MtPJTUAiBL9Jgm8hgaqIFYrjqijkpaRG9yKw4VaoA+jJwTUVGvLg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19750},"main":"./build/src/main.js","type":"module","types":"./build/src/main.d.ts","engines":{"node":">=18.18.0"},"exports":{"types":"./build/src/main.d.ts","default":"./build/src/main.js"},"gitHead":"6691e359e75746953cb851b7477640614dc97250","scripts":{"test":"gulp test"},"_npmUser":{"name":"ehmicky","email":"ehmicky@gmail.com"},"repository":{"url":"git+https://github.com/ehmicky/winston-error-format.git","type":"git"},"_npmVersion":"10.8.1","description":"Log errors with Winston","directories":{"lib":"src"},"sideEffects":false,"_nodeVersion":"22.2.0","dependencies":{"logform":"^2.6.0","triple-beam":"^1.4.1","is-plain-obj":"^4.1.0","safe-json-value":"^3.0.0","error-serializer":"^8.0.0","is-error-instance":"^3.0.0","normalize-exception":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"test-each":"^7.0.0","@ehmicky/dev-tasks":"^2.0.124"},"peerDependencies":{"winston":"^3.11.0"},"_npmOperationalInternal":{"tmp":"tmp/winston-error-format_3.0.1_1718078407554_0.4488946401290985","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"winston-error-format","version":"3.0.2","type":"module","exports":{"types":"./build/src/main.d.ts","default":"./build/src/main.js"},"main":"./build/src/main.js","types":"./build/src/main.d.ts","sideEffects":false,"scripts":{"test":"gulp test"},"description":"Log errors with Winston","keywords":["browser","console","error","error-handler","error-handling","error-monitoring","format","formatter","http","javascript","library","log","logger","logger-middleware","logging","nodejs","typescript","winston","winston-logger","winstonjs"],"license":"MIT","homepage":"https://www.github.com/ehmicky/winston-error-format","repository":{"type":"git","url":"git+https://github.com/ehmicky/winston-error-format.git"},"bugs":{"url":"https://github.com/ehmicky/winston-error-format/issues"},"author":{"name":"ehmicky","email":"ehmicky@gmail.com","url":"https://github.com/ehmicky"},"directories":{"lib":"src"},"dependencies":{"error-serializer":"^8.0.1","is-error-instance":"^3.0.1","is-plain-obj":"^4.1.0","logform":"^2.7.0","normalize-exception":"^4.0.1","safe-json-value":"^3.0.1","triple-beam":"^1.4.1"},"devDependencies":{"@ehmicky/dev-tasks":"^3.0.33","@ehmicky/eslint-config":"^20.0.31","@ehmicky/prettier-config":"^1.0.6","test-each":"^7.0.1"},"peerDependencies":{"winston":"^3.17.0"},"engines":{"node":">=18.18.0"},"_id":"winston-error-format@3.0.2","gitHead":"59a17dd9a0bb24452d504c7ef38bbfac6f3cad33","_nodeVersion":"23.10.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-etrCMqUmD3tLa4NDH0QifjqOrSegNIb9PTQ93vVenFOFsg9TCweWMYLVEk+ODObtf390y7ssNX2QfMKjJjXr+w==","shasum":"c729998937f17442e89a12cf8db7f489d63267cd","tarball":"https://registry.npmjs.org/winston-error-format/-/winston-error-format-3.0.2.tgz","fileCount":8,"unpackedSize":19422,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCvcDjgcWFWapW916F7B2LCk96zWl+zzulWOjnbdXB1gwIgUFkDhDbwTN1EHEHl04AzDegZRUs/a5QFsGilThUiBDg="}]},"_npmUser":{"name":"ehmicky","email":"ehmicky@gmail.com"},"maintainers":[{"name":"ehmicky","email":"ehmicky@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/winston-error-format_3.0.2_1743218690545_0.7728008031942117"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-23T16:03:09.989Z","modified":"2025-03-29T03:24:50.913Z","0.0.1":"2022-11-23T16:03:10.361Z","1.0.0":"2022-11-23T16:03:27.008Z","2.0.0":"2023-05-14T00:31:21.894Z","3.0.0":"2023-10-28T22:36:01.461Z","3.0.1":"2024-06-11T04:00:07.736Z","3.0.2":"2025-03-29T03:24:50.729Z"},"bugs":{"url":"https://github.com/ehmicky/winston-error-format/issues"},"author":{"name":"ehmicky","email":"ehmicky@gmail.com","url":"https://github.com/ehmicky"},"license":"MIT","homepage":"https://www.github.com/ehmicky/winston-error-format","keywords":["browser","console","error","error-handler","error-handling","error-monitoring","format","formatter","http","javascript","library","log","logger","logger-middleware","logging","nodejs","typescript","winston","winston-logger","winstonjs"],"repository":{"type":"git","url":"git+https://github.com/ehmicky/winston-error-format.git"},"description":"Log errors with Winston","maintainers":[{"name":"ehmicky","email":"ehmicky@gmail.com"}],"readme":"[![Node](https://img.shields.io/badge/-Node.js-808080?logo=node.js&colorA=404040&logoColor=66cc33)](https://www.npmjs.com/package/winston-error-format)\n[![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript&colorA=404040&logoColor=0096ff)](/src/main.d.ts)\n[![Codecov](https://img.shields.io/badge/-Tested%20100%25-808080?logo=codecov&colorA=404040)](https://codecov.io/gh/ehmicky/winston-error-format)\n[![Minified size](https://img.shields.io/bundlephobia/minzip/winston-error-format?label&colorA=404040&colorB=808080&logo=webpack)](https://bundlephobia.com/package/winston-error-format)\n[![Mastodon](https://img.shields.io/badge/-Mastodon-808080.svg?logo=mastodon&colorA=404040&logoColor=9590F9)](https://fosstodon.org/@ehmicky)\n[![Medium](https://img.shields.io/badge/-Medium-808080.svg?logo=medium&colorA=404040)](https://medium.com/@ehmicky)\n\nLog errors with [Winston](https://github.com/winstonjs/winston).\n\n# Features\n\nThis provides with two Winston\n[formats](https://github.com/winstonjs/winston/blob/master/README.md#formats):\n\n- [Full](#fullformatoptions): includes all properties\n- [Short](#shortformatoptions): includes only the error's `name`, `message` and\n  `stack`\n\nUnlike Winston's default\n[error format](https://github.com/winstonjs/logform#errors):\n\n- The error `name` is logged\n- The full format logs nested errors, including\n  [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause)\n  and aggregate\n  [`errors`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError)\n- The full format is [JSON-safe](https://github.com/ehmicky/safe-json-value)\n- The short format optionally logs the stack trace\n- The error instance is not modified\n\n# Example\n\nUsing the [full format](#fullformatoptions).\n\n```js\nimport { createLogger, format, transports } from 'winston'\n\nimport { fullFormat } from 'winston-error-format'\n\nconst logger = createLogger({\n  format: format.combine(fullFormat(), format.json()),\n  transports: [new transports.Http(httpOptions)],\n})\n\nconst error = new ExampleError('Could not read file.')\nerror.filePath = '/...'\nlogger.error(error)\n// Sent via HTTP:\n// {\n//   level: 'error',\n//   name: 'ExampleError',\n//   message: 'Could not read file.',\n//   stack: `ExampleError: Could not read file.\n//     at ...`,\n//   filePath: '/...',\n// }\n```\n\nUsing the [short format](#shortformatoptions).\n\n```js\nimport { createLogger, format, transports } from 'winston'\n\nimport { shortFormat } from 'winston-error-format'\n\nconst logger = createLogger({\n  format: format.combine(shortFormat(), format.cli()),\n  transports: [new transports.Console()],\n})\n\nconst error = new ExampleError('Could not read file.')\nlogger.error(error)\n// Printed on the console:\n// error: ExampleError: Could not read file.\n//     at ...\n```\n\n# Install\n\n```bash\nnpm install winston-error-format\n```\n\nThis package requires installing [Winston](https://github.com/winstonjs/winston)\nseparately.\n\n```bash\nnpm install winston\n```\n\nThis package works in Node.js >=18.18.0.\n\nThis is an ES module. It must be loaded using\n[an `import` or `import()` statement](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c),\nnot `require()`. If TypeScript is used, it must be configured to\n[output ES modules](https://www.typescriptlang.org/docs/handbook/esm-node.html),\nnot CommonJS.\n\n# API\n\n## fullFormat(options?)\n\n`options`: [`Options`](#options)\\\n_Return value_: `Format`\n\nReturns a logger\n[`format`](https://github.com/winstonjs/winston/blob/master/README.md#formats)\nto [combine](https://github.com/winstonjs/winston#combining-formats) with\n[`format.json()`](https://github.com/winstonjs/logform#json) or\n[`format.prettyPrint()`](https://github.com/winstonjs/logform#prettyprint). This\nlogs all error properties, making it useful with\n[transports](https://github.com/winstonjs/winston#transports) like\n[HTTP](https://github.com/winstonjs/winston/blob/master/docs/transports.md#http-transport).\n\nErrors should be logged using\n[`logger.*(error)`](https://github.com/winstonjs/winston/blob/master/README.md#creating-your-own-logger).\n\n## shortFormat(options?)\n\n`options`: [`Options`](#options)\\\n_Return value_: `Format`\n\nReturns a logger\n[`format`](https://github.com/winstonjs/winston/blob/master/README.md#formats)\nto [combine](https://github.com/winstonjs/winston#combining-formats) with\n[`format.simple()`](https://github.com/winstonjs/logform#simple) or\n[`format.cli()`](https://github.com/winstonjs/logform#cli). This logs only the\nerror `name`, `message` and `stack`, making it useful with\n[transports](https://github.com/winstonjs/winston#transports) like the\n[console](https://github.com/winstonjs/winston/blob/master/docs/transports.md#console-transport).\n\nErrors should be logged using\n[`logger.*(error)`](https://github.com/winstonjs/winston/blob/master/README.md#creating-your-own-logger).\n\n## Options\n\n_Type_: `object | ((Error) => object)`\n\nThe options object can be error-specific by passing a function returning it\ninstead.\n\n### stack\n\n_Type_: `boolean`\\\n_Default_: `true`\n\nWhether to log the stack trace.\n\n### level\n\n_Type_: `string`\n\nOverride the log [level](https://github.com/winstonjs/winston#logging-levels).\n\n### transform\n\n_Type_: `(Error) => Error`\n\nMaps the `error` before logging it.\n\n# Related projects\n\n- [`winston`](https://github.com/winstonjs/winston): A logger for just about\n  everything\n- [`modern-errors`](https://github.com/ehmicky/modern-errors): Handle errors in\n  a simple, stable, consistent way\n- [`modern-errors-winston`](https://github.com/ehmicky/modern-errors-winston):\n  Log errors with Winston\n- [`error-custom-class`](https://github.com/ehmicky/error-custom-class): Create\n  one error class\n- [`error-class-utils`](https://github.com/ehmicky/error-class-utils): Utilities\n  to properly create error classes\n- [`error-serializer`](https://github.com/ehmicky/error-serializer): Convert\n  errors to/from plain objects\n- [`normalize-exception`](https://github.com/ehmicky/normalize-exception):\n  Normalize exceptions/errors\n- [`is-error-instance`](https://github.com/ehmicky/is-error-instance): Check if\n  a value is an `Error` instance\n- [`merge-error-cause`](https://github.com/ehmicky/merge-error-cause): Merge an\n  error with its `cause`\n- [`set-error-class`](https://github.com/ehmicky/set-error-class): Properly\n  update an error's class\n- [`set-error-message`](https://github.com/ehmicky/set-error-message): Properly\n  update an error's message\n- [`wrap-error-message`](https://github.com/ehmicky/wrap-error-message):\n  Properly wrap an error's message\n- [`set-error-props`](https://github.com/ehmicky/set-error-props): Properly\n  update an error's properties\n- [`set-error-stack`](https://github.com/ehmicky/set-error-stack): Properly\n  update an error's stack\n- [`error-cause-polyfill`](https://github.com/ehmicky/error-cause-polyfill):\n  Polyfill `error.cause`\n- [`handle-cli-error`](https://github.com/ehmicky/handle-cli-error): 💣 Error\n  handler for CLI applications 💥\n- [`safe-json-value`](https://github.com/ehmicky/safe-json-value): ⛑️ JSON\n  serialization should never fail\n- [`log-process-errors`](https://github.com/ehmicky/log-process-errors): Show\n  some ❤ to Node.js process errors\n- [`error-http-response`](https://github.com/ehmicky/error-http-response):\n  Create HTTP error responses\n\n# Support\n\nFor any question, _don't hesitate_ to [submit an issue on GitHub](../../issues).\n\nEveryone is welcome regardless of personal background. We enforce a\n[Code of conduct](CODE_OF_CONDUCT.md) in order to promote a positive and\ninclusive environment.\n\n# Contributing\n\nThis project was made with ❤️. The simplest way to give back is by starring and\nsharing it online.\n\nIf the documentation is unclear or has a typo, please click on the page's `Edit`\nbutton (pencil icon) and suggest a correction.\n\nIf you would like to help us fix a bug or add a new feature, please check our\n[guidelines](CONTRIBUTING.md). Pull requests are welcome!\n\n<!-- Thanks go to our wonderful contributors: -->\n\n<!-- ALL-CONTRIBUTORS-LIST:START -->\n<!-- prettier-ignore -->\n<!--\n<table><tr><td align=\"center\"><a href=\"https://fosstodon.org/@ehmicky\"><img src=\"https://avatars2.githubusercontent.com/u/8136211?v=4\" width=\"100px;\" alt=\"ehmicky\"/><br /><sub><b>ehmicky</b></sub></a><br /><a href=\"https://github.com/ehmicky/winston-error-format/commits?author=ehmicky\" title=\"Code\">💻</a> <a href=\"#design-ehmicky\" title=\"Design\">🎨</a> <a href=\"#ideas-ehmicky\" title=\"Ideas, Planning, & Feedback\">🤔</a> <a href=\"https://github.com/ehmicky/winston-error-format/commits?author=ehmicky\" title=\"Documentation\">📖</a></td></tr></table>\n -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n","readmeFilename":"README.md"}