{"_id":"typescript-logging-log4ts-style","_rev":"5-90e8ad0fa7580388510209bdf3023912","name":"typescript-logging-log4ts-style","dist-tags":{"latest":"2.2.0"},"versions":{"2.0.0":{"name":"typescript-logging-log4ts-style","version":"2.0.0","description":"TypeScript Logging log4ts style written in and to be used by TypeScript.","main":"dist/bundle/typescript-logging-log4ts.js","module":"dist/bundle/typescript-logging-log4ts.esm.js","typings":"dist/bundle/src/typescript/main/typescript-logging-log4ts.d.ts","scripts":{"clean":"shx rm -rf ./dist","compile":"rollup -c","compile-watch":"rollup -cw","tslint":"tslint -c tslint.json -p tsconfig.json","test":"jest --no-cache","test-watch":"jest --watchAll","build":"npm run clean && npm run compile && npm run test && npm run tslint && npm pack --pack-destination dist"},"repository":{"type":"git","url":"git+https://github.com/vauxite-org/typescript-logging.git"},"keywords":["typescript-logging","typescript logging","typescript-logging log4ts","typescript logging log4ts","typescript logger","log4ts","log4ts-like","logging","log","logger"],"author":{"name":"Martijn Reuvers","email":"martijnr.work@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vauxite-org/typescript-logging/issues"},"homepage":"https://github.com/vauxite-org/typescript-logging/#readme","peerDependencies":{"typescript-logging":"2.0.x"},"devDependencies":{"@rollup/plugin-commonjs":"21.0.1","@rollup/plugin-node-resolve":"13.0.6","@types/jest":"27.0.2","jest":"27.3.1","rollup":"2.58.3","rollup-plugin-typescript2":"0.30.0","shx":"0.3.3","ts-jest":"27.0.7","ts-loader":"9.2.6","ts-node":"10.4.0","tslint":"6.1.3","typescript":"4.4.4"},"gitHead":"80a60a705121598e100c7bef67ef2df45ce6b0d4","_id":"typescript-logging-log4ts-style@2.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-4ww/PMB0f1W5aNldekzc2LpBQo/80t4qTyNjCSZ8J50csj2eKqkUrVz8/RTEffB2kNw/sf0GAGft9YnOghh4qg==","shasum":"9325d30bf2bbb9aa0471b89bd5cb4df32d1a736d","tarball":"https://registry.npmjs.org/typescript-logging-log4ts-style/-/typescript-logging-log4ts-style-2.0.0.tgz","fileCount":29,"unpackedSize":300614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD3hvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpsHA//RShxzLR138R8vdijKIkiRy0xecnV6f1aNCywgV+c1rqSz5Er\r\nrDuErKC4UpK0E5HiLQ0zLBgQ5MQe+97tG7TLN10E3Civ2PMdQ5ayoBgIDTa7\r\nvAJpj09pXcs0g+2jetl30fwWy7qrOz1rgKWm4BbwLavq19qcQVCJDqD0XXNX\r\nkuhBzeHw+7lS0iz4trae0bLUOVv00ndhw2LV+iI4vScdJTl4yOMThPx7vkSP\r\nISoYuw4DGMWe5Z39EWS0H4mrmmi59StxFqHd5jZIviRxges6Bjicw5BlWWIa\r\nEH+X/4a1coFs1smx5FHZHuCdnfr7QL/AbQJOzL4XxZsUjlkGtViEN4bptoe9\r\nNCEj4mt1MZbsOkbhQLjp+OxiWP2FOeHm0bLxqkvcDMTXW7cQhJJEMBotk8Wj\r\nkJ9HuHiCZwU7NXQ3huMcNDEcf5cNcdAPs9PxZq/ybNuzy6TLPE2vd8hZF6P8\r\n0gsL//RfSW3HbI+fn4/Qh/Xj953RSlKrrE1N0MQAZtYwf0B3Idc3QzyS81F8\r\n1d+o16Asl6CKkynJPD+CWsL+49ZNPFrx55YxoOMQe3XERuoxBq5BsBm0Fo0s\r\nYoGn5/ma6GAMMrGLUBpjsG5mP6LubFgw5ew481AkCSgw7QZL4fhxhloOs7n+\r\nfeZzFlK9TaN1cY5nlFzgStBs4IiWDlF8Mpw=\r\n=9tLI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHMUuDoY8vDJYmH7azpq9WQo7xXtPgYO5VEHQWGhYqOrAiAK5czbNAjmKYO58ewKxCqGDREz6T5x3b7Ph+2xIM3T6A=="}]},"_npmUser":{"name":"mre","email":"martijnr.work@gmail.com"},"directories":{},"maintainers":[{"name":"mre","email":"martijnr.work@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-logging-log4ts-style_2.0.0_1645181039815_0.03888206138905437"},"_hasShrinkwrap":false},"2.0.1":{"name":"typescript-logging-log4ts-style","version":"2.0.1","description":"TypeScript Logging log4ts style written in and to be used by TypeScript.","main":"dist/bundle/typescript-logging-log4ts.js","module":"dist/bundle/typescript-logging-log4ts.esm.js","typings":"dist/bundle/src/typescript/main/typescript-logging-log4ts.d.ts","scripts":{"clean":"shx rm -rf ./dist","compile":"rollup -c","compile-watch":"rollup -cw","tslint":"tslint -c tslint.json -p tsconfig.json","test":"jest --no-cache","test-watch":"jest --watchAll","build":"npm run clean && npm run compile && npm run test && npm run tslint && npm pack --pack-destination dist"},"repository":{"type":"git","url":"git+https://github.com/vauxite-org/typescript-logging.git"},"keywords":["typescript-logging","typescript logging","typescript-logging log4ts","typescript logging log4ts","typescript logger","log4ts","log4ts-like","logging","log","logger"],"author":{"name":"Martijn Reuvers","email":"martijnr.work@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vauxite-org/typescript-logging/issues"},"homepage":"https://github.com/vauxite-org/typescript-logging/#readme","peerDependencies":{"typescript-logging":"~2.0.1"},"devDependencies":{"@rollup/plugin-commonjs":"21.0.1","@rollup/plugin-node-resolve":"13.0.6","@types/jest":"27.0.2","jest":"27.3.1","rollup":"2.58.3","rollup-plugin-typescript2":"0.30.0","shx":"0.3.3","ts-jest":"27.0.7","ts-loader":"9.2.6","ts-node":"10.4.0","tslint":"6.1.3","typescript":"4.4.4"},"gitHead":"5774832f619d9ff571edb2009e6e6dc28f1a9b16","_id":"typescript-logging-log4ts-style@2.0.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-Y4IlzlEGckhb/tor077Xlc15+/InR6NTH94awqtQvk/gS6icmLw1WMhYrK5PmTYt3W/JyKjkXbBUboN3jcMsmA==","shasum":"e0bfc27d6c1547a82f03240ab2ccabd2fe73310c","tarball":"https://registry.npmjs.org/typescript-logging-log4ts-style/-/typescript-logging-log4ts-style-2.0.1.tgz","fileCount":29,"unpackedSize":300751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJH2FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoXqg//dDAcMNclbD7LnwUz5RVe/cMZNneP++KMM9IQ0nsdZZwP5usW\r\ngkgnlhAVegh6IZzF5g8gY3YFrWwHisdszT5bAPvrHc9S7gDRqYKmA+vCCP7O\r\nlNcZ2LSoWX+ILDE4+0IBlmX4pIRcVsjmqeEyZUH/3EzxP8GXGm/fCX0kKP/H\r\nm4tauOuI+pzOqegaqWaANL+YJde7P2KFAsPKJ7febgLNLKFEC2yKzP7m1CYa\r\nUnQDHXaUJRJFIAW5Tnm0Dvp62Z8fxucPfiqOyuAW1LWKCFSLP1eoY/ruu+an\r\nx76xuISMRttUyf4gIDWTzsMqwdFVAtWo859qe9BRIQZwDfnZVNCwUONNYMKq\r\nhqPKNyM5DxPTrkdSG6+rJtqRUpPbjySogJ8zuAm48MP0cLL5JVqjQmSRIj+J\r\nWiLOGU6LEGnORwFqySCjeXKjmmN3xB02bm6FGTuRXw9SAN7D9jEsWSgiQXi1\r\nUGKvSIJ9lpYkJO/BNS+KBHrSKI6Z+1gQTyJYWhI7jcg20N1Xt+A/tsBBtrpw\r\nWBniiKXArsVwD8pT4vHwqraTdGUuLl/lv7stcPxT4oDJmGW1PWR+mkuiP6Tj\r\nuXtSc53XZm1f7MAYbHG0QrgZXFrXN5uiExY5M8j8mzZG+79tvJghlmt3aj0Z\r\nncg62hkLUqrLtULiXh45hSB+zxL3DilagJM=\r\n=6fNu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAb28AZ93vhcd9Gx3imXo2KYkfPM9iB+qpYD4w1k4saTAiEA8POzjbFA26xRtjEO8XIq3kXh4kWF+A2FxC8UpGquVI4="}]},"_npmUser":{"name":"mre","email":"martijnr.work@gmail.com"},"directories":{},"maintainers":[{"name":"mre","email":"martijnr.work@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-logging-log4ts-style_2.0.1_1646558597155_0.42248484630969285"},"_hasShrinkwrap":false},"2.0.2":{"name":"typescript-logging-log4ts-style","version":"2.0.2","description":"TypeScript Logging log4ts style written in and to be used by TypeScript.","main":"dist/bundle/typescript-logging-log4ts.js","module":"dist/bundle/typescript-logging-log4ts.esm.js","typings":"dist/bundle/src/typescript/main/typescript-logging-log4ts.d.ts","scripts":{"clean":"shx rm -rf ./dist","compile":"rollup -c","compile-watch":"rollup -cw","tslint":"tslint -c tslint.json -p tsconfig.json","test":"jest --no-cache","test-watch":"jest --watchAll","build":"npm run clean && npm run compile && npm run test && npm run tslint && npm pack --pack-destination dist"},"repository":{"type":"git","url":"git+https://github.com/vauxite-org/typescript-logging.git"},"keywords":["typescript-logging","typescript logging","typescript-logging log4ts","typescript logging log4ts","typescript logger","log4ts","log4ts-like","logging","log","logger"],"author":{"name":"Martijn Reuvers","email":"martijnr.work@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vauxite-org/typescript-logging/issues"},"homepage":"https://github.com/vauxite-org/typescript-logging/#readme","peerDependencies":{"typescript-logging":"~2.0.2"},"devDependencies":{"@rollup/plugin-commonjs":"21.0.1","@rollup/plugin-node-resolve":"13.0.6","@types/jest":"27.0.2","jest":"27.3.1","rollup":"2.58.3","rollup-plugin-typescript2":"0.30.0","shx":"0.3.3","ts-jest":"27.0.7","ts-loader":"9.2.6","ts-node":"10.4.0","tslint":"6.1.3","typescript":"4.4.4"},"gitHead":"26af20ab7b3c1198f1d1bad1d71b0f1dd57ded5d","_id":"typescript-logging-log4ts-style@2.0.2","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-UYMdbJhyGPCKWAcoim2tLA8j6p2O3MAN4hrFzQcZTdbajCi1DdebrlDzAIGMHhqXgNfvMviu1La+mMdhoC3mTg==","shasum":"96ad3b1cad02ebaf58231b149f088f1e591cf8ec","tarball":"https://registry.npmjs.org/typescript-logging-log4ts-style/-/typescript-logging-log4ts-style-2.0.2.tgz","fileCount":29,"unpackedSize":301731,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHGQfdDiSpAT20cjsbIy9Km59I7em8nYaqSAqSvSelRAAiEAgRa1/U2LDw8UBEc7OcGTEKb3rSA0ADYSQwx3+WzaU2k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3jR8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRlg/+Oy5snySDJ7WtbqLp0/rQM7I36PldyLO5zViooz9+HKF9hfJU\r\nmt1btDhVZ/q9XDruNqMgLFcY7WjRo0yQWqW7PxfCxZqWUNkffy3LFcEvWNdW\r\nq/W0QCFhmbTBg8bdVrzSxvGPJH4sk8L6GvIXBgk/jDRjzaeTaAej9cgj5QU0\r\nr/qOkloawfxPiwFMAxKJVxVAsYz/CP4TN6fGorVe12CDOIiCfsVmhXyFdAmW\r\nHp4CKoioWYj/dSm8CB9Gqup45swlwIUP2stAMVKREJ6tmaupjBCl+RatoOqS\r\nPJfoYI6ddpiBAGxOmSH7eLvx+SSp92i4lhHjvKUwuLyjpx9ku9aEab0mt5nv\r\nC/kDfA5pY+E1RV2251SJWK/sULUsMWPXm2+s+sHgk/f91VD0++NBzutKxUde\r\nH+1ftsSTX1L75f/2hTxmda6IL1EiSMxg4AZBJLnoD53MiwuCeR14n8ZpX8r1\r\nJ2eZQj11yjB6sj96UKJoBBya6L03aUNNjNF6pSHyFIdMsPraeeAiR49ekYGn\r\n8GxrSWFB/Wi2w48wgeWdDNSvuYZ3NB+Vy6flNwJaGj8XgpWPxSbvXuZszytg\r\nZ/j0OmuoavRuzHFU9zk8T2efR11UPoAHMAC0JeuJeq/Psim+JaPcIpglyaJR\r\nj5Kqc+kHTtaxvz50h0rMtbaxztz4Ke+y6ZM=\r\n=vmkH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mre","email":"martijnr.work@gmail.com"},"directories":{},"maintainers":[{"name":"mre","email":"martijnr.work@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-logging-log4ts-style_2.0.2_1658729596241_0.37271532893846215"},"_hasShrinkwrap":false},"2.1.0":{"name":"typescript-logging-log4ts-style","version":"2.1.0","description":"TypeScript Logging log4ts style written in and to be used by TypeScript.","main":"dist/bundle/typescript-logging-log4ts.js","module":"dist/bundle/typescript-logging-log4ts.esm.js","typings":"dist/bundle/src/typescript/main/typescript-logging-log4ts.d.ts","scripts":{"clean":"shx rm -rf ./dist","compile":"rollup -c","compile-watch":"rollup -cw","tslint":"tslint -c tslint.json -p tsconfig.json","test":"jest --no-cache","test-watch":"jest --watchAll","build":"npm run clean && npm run compile && npm run test && npm run tslint && npm pack --pack-destination dist"},"repository":{"type":"git","url":"git+https://github.com/vauxite-org/typescript-logging.git"},"keywords":["typescript-logging","typescript logging","typescript-logging log4ts","typescript logging log4ts","typescript logger","log4ts","log4ts-like","logging","log","logger"],"author":{"name":"Martijn Reuvers","email":"martijnr.work@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vauxite-org/typescript-logging/issues"},"homepage":"https://github.com/vauxite-org/typescript-logging/#readme","peerDependencies":{"typescript-logging":"~2.1.0"},"devDependencies":{"@rollup/plugin-commonjs":"24.0.1","@rollup/plugin-node-resolve":"15.0.1","@types/jest":"29.4.0","jest":"29.5.0","jest-environment-jsdom":"29.5.0","rollup":"3.18.0","rollup-plugin-typescript2":"0.34.1","shx":"0.3.4","ts-jest":"29.0.5","ts-loader":"9.4.2","ts-node":"10.9.1","tslint":"6.1.3","typescript":"4.9.5"},"gitHead":"f862fcb0b60e2258616571d448d5994aa8350d09","_id":"typescript-logging-log4ts-style@2.1.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-yXvvi4MbDlvYel3c2/Z1kdf4PiiJ9rUe64iP+GOqrsSEwnCnWh78JLo7yYf7CNOEhaqZBAUa1P5GXoFxoGhTQQ==","shasum":"839e121f5f3b37f00f26a2a2b3db4ecb5d125089","tarball":"https://registry.npmjs.org/typescript-logging-log4ts-style/-/typescript-logging-log4ts-style-2.1.0.tgz","fileCount":29,"unpackedSize":306454,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGFFVqtukPReq2TcoSvctLR3x9xmJ2XCZASqlsApcbnQAiBNbFgOUO912+1fceRM02OBA4QEn8t8U/hTwf/I/EEt9Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCgTUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSkw/+J2+KTrKrBi0KwoMCI9/N9fN2NvWqtIaZe1lIDjc+sLe6Piqc\r\nlfhs0VilXjk3pkeLLhT+jTtTvPb5CMWDgETKGmr6P0sUDcg0G/MA3cOIzFlo\r\nwXIuMEZwEH6pvWXTvN9xrDYGUWUHMuaIySm+B13QLn9tBd//BWGwk6dM3Jwy\r\n68WH4u+MBpz6/MrRqmYF1XT3cJpnHyPEAMlj5eI2diZvII/+32cvYbyBWvuv\r\nULzCWEmNWRYzGu/fV9haZyrOKQprdV8JzddOht4qbD/k0rg31DuEx++W5U+L\r\nXc3h8qcSiQsMzrPo/4JMhPvhl/D3E9EknkbNdivFZs1cxfWRTEur5tXSpmuY\r\nJ5TsVwPo3+fnOTM4Uj3A/6T9pgIzMiiugph6U2S9wuydNWfTPhpwFOclGAsQ\r\nBJlZzhnpS1M8EkmAsTO874nqEkL3kvVWeEYm4b7Uhsi6FxOgPP8Wn4F1h9UC\r\nScHcW8FoexFHcEMGrGJ07a4lNPTmKgew1LoPqfczJpkuHpfoEUHPw/Yq29s0\r\n+UIN9n3h6rn5fS+qNY/alk1rxirCm+yMWCf1D1JiJRvCPq16TRLn6zKW9v0r\r\nYeJ6GHdsIOtGShenYBei/gJLDFLt3BohFANOi4C+Mgh4q3RmlCFq+is6+D79\r\n0x/HFJo0ttZUiwDlScXigcgRJ/tW/mQ2VR4=\r\n=dkS7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mre","email":"martijnr.work@gmail.com"},"directories":{},"maintainers":[{"name":"mre","email":"martijnr.work@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-logging-log4ts-style_2.1.0_1678378195802_0.03373084964528528"},"_hasShrinkwrap":false},"2.2.0":{"name":"typescript-logging-log4ts-style","version":"2.2.0","description":"TypeScript Logging log4ts style written in and to be used by TypeScript.","main":"dist/bundle/typescript-logging-log4ts.js","module":"dist/bundle/typescript-logging-log4ts.esm.js","typings":"dist/bundle/src/typescript/main/typescript-logging-log4ts.d.ts","scripts":{"clean":"shx rm -rf ./dist","compile":"rollup -c","compile-watch":"rollup -cw","tslint":"tslint -c tslint.json -p tsconfig.json","test":"jest --no-cache","test-watch":"jest --watchAll","build":"npm run clean && npm run compile && npm run test && npm run tslint && npm pack --pack-destination dist"},"repository":{"type":"git","url":"git+https://github.com/vauxite-org/typescript-logging.git"},"keywords":["typescript-logging","typescript logging","typescript-logging log4ts","typescript logging log4ts","typescript logger","log4ts","log4ts-like","logging","log","logger"],"author":{"name":"Martijn Reuvers","email":"martijnr.work@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vauxite-org/typescript-logging/issues"},"homepage":"https://github.com/vauxite-org/typescript-logging/#readme","peerDependencies":{"typescript-logging":"~2.2.0"},"devDependencies":{"@rollup/plugin-commonjs":"25.0.7","@rollup/plugin-node-resolve":"15.2.3","@types/jest":"29.5.12","jest":"29.7.0","jest-environment-jsdom":"29.7.0","rollup":"4.13.2","rollup-plugin-typescript2":"0.36.0","shx":"0.3.4","ts-jest":"29.1.2","ts-loader":"9.5.1","ts-node":"10.9.1","tslint":"6.1.3","typescript":"5.1.6"},"_id":"typescript-logging-log4ts-style@2.2.0","gitHead":"15961f1ba3e272e0757798be2da1de9ac4ecf0e8","_nodeVersion":"20.12.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-NP8uoFVoNJkhH6iOM1Y8+/RVFoSPCxLe/kgdxQ0uJNhUJh4CLp7CuMIh/njC9mzK0wdq2DgSJcmlzkqnRXx1Eg==","shasum":"f9553d98d8a33108fe4324150638c2f8bafc675b","tarball":"https://registry.npmjs.org/typescript-logging-log4ts-style/-/typescript-logging-log4ts-style-2.2.0.tgz","fileCount":29,"unpackedSize":301747,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBo8yB7HkAS3a5BL+z8aS6HiSchfwNbnt9RANE5DEwL+AiEAk21LZT5EnJD2OI8v7v3DtDLkERSb0kGYzvLooAWkkQw="}]},"_npmUser":{"name":"mre","email":"martijnr.work@gmail.com"},"directories":{},"maintainers":[{"name":"mre","email":"martijnr.work@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-logging-log4ts-style_2.2.0_1712998570702_0.8677229818978336"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-18T10:43:59.815Z","2.0.0":"2022-02-18T10:43:59.997Z","modified":"2024-04-13T08:56:11.063Z","2.0.1":"2022-03-06T09:23:17.380Z","2.0.2":"2022-07-25T06:13:16.511Z","2.1.0":"2023-03-09T16:09:55.987Z","2.2.0":"2024-04-13T08:56:10.874Z"},"maintainers":[{"name":"mre","email":"martijnr.work@gmail.com"}],"description":"TypeScript Logging log4ts style written in and to be used by TypeScript.","homepage":"https://github.com/vauxite-org/typescript-logging/#readme","keywords":["typescript-logging","typescript logging","typescript-logging log4ts","typescript logging log4ts","typescript logger","log4ts","log4ts-like","logging","log","logger"],"repository":{"type":"git","url":"git+https://github.com/vauxite-org/typescript-logging.git"},"author":{"name":"Martijn Reuvers","email":"martijnr.work@gmail.com"},"bugs":{"url":"https://github.com/vauxite-org/typescript-logging/issues"},"license":"Apache-2.0","readme":"# TypeScript Logging Log4TS style\n\nLogging library for Typescript projects. This is one of the available flavors, please see [here](../README.md) for all\navailable styles.\n\nThis flavor is well known and used by many logger solutions (like e.g. log4j). It allows creation of loggers based on a\nname, where each unique name represents a Logger. Often namespaces (packages/paths) and/or logically named groups are\nused to structure the output of the logging, like for example: \"service.Account\", \"model.SomeObject\", \"view.Component\"\netc.\n\n* [Getting started](#getting-started)\n* [Logging](#logging)\n* [Configuration](#configuration)\n* [Dynamic control](#dynamic-control)\n\nUsing typescript-logging **_version 1_**? Please\nvisit [https://github.com/vauxite-org/typescript-logging/tree/release-1.x](https://github.com/vauxite-org/typescript-logging/tree/release-1.x)\nfor more details. Consider upgrading to the latest version.\n\n## Getting started\n\nThis section describes how to get started quickly.\n\n### Installation\n\nTo install this flavor issue the following commands:\n\n```shell\nnpm install --save typescript-logging\nnpm install --save typescript-logging-log4ts-style\n```\n\nThe first command installs the \"core\" of typescript logging and is a required dependency. The second command installs\nthe flavor (log4ts) to use.\n\n### Quick start\n\nThe following code defines a configuration file which creates a single `Log4TSProvider`, which is configured with a log\nlevel of `Debug` (default is `Error`). It also specifies a single 'group', which in this case matches everything based\non namespace. More information about [groups](#options) follows below.\n\nNote that we give the provider a unique name, this is useful for external control (\nsee [Dynamic control](#dynamic-control)) for more details about that.\n\n```typescript\n/*--- config/LogConfig.ts ---*/\nimport {LogLevel} from \"typescript-logging\";\nimport {Log4TSProvider} from \"typescript-logging-log4ts-style\";\n\nexport const log4TSProvider = Log4TSProvider.createProvider(\"AwesomeLog4TSProvider\", {\n  level: LogLevel.Debug,\n  groups: [{\n    expression: new RegExp(\".+\"),\n  }]\n});\n```\n\nThe modules below use the provider created in LogConfig.ts in various ways.\n\n```typescript\n/*--- model/Account.ts ---*/\nimport {log4TSProvider} from \"../config/LogConfig\";\n\n/* Creates a logger called \"model.Account\" */\nconst log = log4TSProvider.getLogger(\"model.Account\");\n\nexport interface Account {\n  name: string;\n}\n\nexport function createAccount(name: string): Account {\n  log.debug(() => `Creating new account with name '${name}'.`);\n  // Something fancy here to create it.\n  return {name};\n}\n```\n\n```typescript\n/*--- service/AccountService.ts ---*/\nimport {log4TSProvider} from \"../config/LogConfig\";\nimport {Account} from \"../model/Account\";\n\n/* Creates a logger called \"service.AccountService\" */\nconst log = log4TSProvider.getLogger(\"service.AccountService\");\n\nexport async function saveAccount(account: Account) {\n  log.debug(() => `Will save account '${account.name}'.`);\n  // ... Update code\n  try {\n    await someUpdateHere();\n  }\n  catch (e) {\n    log.error(() => `Failed to save account '${account.name}'.`, e);\n    throw e;\n  }\n}\n```\n\n```typescript\n/*--- Main.ts ---*/\nimport {log4TSProvider} from \"../config/LogConfig\";\nimport {createAccount} from \"./model/Account\";\nimport {saveAccount} from \"./service/Account\";\n\nconst log = log4TSProvider.getLogger(\"main\");\n\n/* Create an account and save it - log on success/error */\nconst account = createAccount(\"My Account\");\nsaveAccount(account)\n  .then(() => {\n    log.debug(\"Successfully created account.\", account.name);\n  })\n  .catch(e => {\n    log.error(\"Ooops...\", e);\n  });\n```\n\nNow let's assume Main.ts is executed above. It successfully creates and saves the account. The logging will then roughly\nend up like below.\n\n```\n2021-12-31 23:14:26,273 DEBUG [model.Account] Creating new account with name 'My Account'.\n2021-12-31 23:14:26,275 DEBUG [service.Account] Will save account 'My Account'.\n2021-12-31 23:14:27,192 DEBUG [main] Successfully created account. [\"My Account\"] \n```\n\n## Logging\n\nThe quick start above gives an overview on how to create a provider, get loggers from it and then log with them. The\nLogger you use is a CoreLogger (extends it), the latter is from the core (basis) project typescript-logging.\n\nA logger can log on different `LogLevels`:\n\n- Trace\n- Debug\n- Info\n- Warn\n- Error\n- Fatal\n- Off\n\nEach level except 'Off' has a matching function on the Logger, for example `trace` for Trace and `debug` for Debug. The\nsignatures of the function are the same for all of them. Note that the level 'Off' turns logging off completely.\n\nThis shows the signatures for debug.\n\n```typescript\ninterface CoreLogger {\n  debug(message: LogMessageType, ...args: unknown[]): void;\n\n  debug(message: LogMessageType, error: ExceptionType, ...args: unknown[]): void;\n}\n```\n\nThe above may look confusing, but we merge the functions in the implementation (and this is how to declare this in\nTypeScript).\n\nEssentially it allows us to log messages in various formats like this:\n\n```typescript\n// Assume 'log' is our Logger here.\nlog.debug(\"This is a simple message\");\nlog.debug(\"This is a simple message and we log an Error (normally you'd catch it and then log it)\", new Error(\"Some Exception\"));\nlog.debug(() => \"Simple message as lambda\");\nlog.debug(() => \"Simple message as lambda with Error\", () => new Error(\"SomeOther\"));\nlog.debug(\"Simple message with some random arguments\", 100, \"abc\", [\"some\", \"array\"], true);\nlog.debug(() => \"Simple message as lambda with Error and some random arguments\", new Error(\"Some Exception\"), 100, \"abc\", [\"some\", \"array\"], true);\n```\n\nThe example of `debug` applies to any of the available functions (trace, debug, info, warn, error and fatal). What is\nlogged exactly how will depend on the configuration and channel in use.\n\n## Configuration\n\nThis section provides more details on how to configure the log4ts style logging.\n\n### Options\n\nA Log4TSProvider created without any options logs on `LogLevel.Error` and uses a default channel that logs to the\nconsole. Messages are formatted in a default sane format (see above for an example).\n\nThis code snippet creates a Log4TSProvider with default settings, the `groups` property is required to be specified and\nin this case we match every namespace. Note we also specify an identifier, it is recommended to specify the identifier\nif\nyou intend to make use of the dynamic control (see in later sections).\n\n```typescript\nimport {Log4TSProvider} from \"typescript-logging-log4ts-style\";\n\nconst provider = Log4TSProvider.createProvider(\"ExampleProvider\", {\n  groups: [{\n    identifier: \"matchAll\",\n    expression: new RegExp(\".+\"),\n  }]\n});\n```\n\nThe following configuration options are available and can be passed as optional argument when creating the\nLog4TSProvider. The documentation for each option can be read below\n(this is from the source code so your IDE will help you with that too).\n\n```typescript\ntype Log4TSConfigOptional = {\n  /** Groups registered, a group is used to match loggers by name/expression path, at least 1 group is required */\n  readonly groups: ReadonlyArray<Log4TSGroupConfig>;\n\n  /**\n   * Default LogLevel.\n   */\n  readonly level?: LogLevel;\n\n  /**\n   * What kind of channel to log to (a normal or raw channel).\n   * In some cases the flavor maybe it to be changed in a more\n   * fine-grained control where different channels can be used.\n   *\n   * However, by default this is the channel that is used without\n   * any specif configuration.\n   *\n   * The default channel logs to console.\n   */\n  readonly channel?: LogChannel | RawLogChannel;\n\n  /**\n   * The argument formatter to use.\n   */\n  readonly argumentFormatter?: ArgumentFormatterType;\n\n  /**\n   * The date formatter to use to format a timestamp in the log line.\n   */\n  readonly dateFormatter?: DateFormatterType;\n}\n\ntype Log4TSGroupConfigOptional = {\n  /**\n   * Expression to match a namespace (package/paths). For example new RegExp(\".+\") matches all, while\n   * new RegExp(\"service.+\") matches all within the service namespace.\n   */\n  readonly expression?: RegExp;\n\n  /**\n   * Identifier, this is used to make your life easier when you need to dynamically\n   * control the log levels of this group and easily wish to recognize it.\n   *\n   * It is used in Log4TSProvider.updateRuntimeSettingsGroup(..) for example as the identifier there.\n   *\n   * If not set externally, it will be set to the expression's representation as string instead.\n   */\n  readonly identifier?: string;\n}\n```\n\nWith this knowledge we can create for example a provider that logs on a different log level, uses a custom date\nformatter and logs to a custom LogChannel like the following code snippet.\n\n```typescript\nimport {LogLevel} from \"typescript-logging\";\nimport {Log4TSProvider} from \"typescript-logging-log4ts-style\";\n\nconst provider = Log4TSProvider.createProvider(\"ProviderWithCustomSettings\", {\n  groups: [{\n    identifier: \"matchAll\",\n    expression: new RegExp(\".+\"),\n  }],\n  level: LogLevel.Info,\n  dateFormatter: millisSinceEpoch => `${millisSinceEpoch}`, // Silly example, normally you'd e.g. create a Date and do custom formatting for that.\n  channel: {\n    type: \"LogChannel\",\n    write: logMessage => console.log(`This is a custom channel: ${logMessage.message}`),\n  },\n});\n```\n\nThe example is a bit silly to keep it simple. It writes the millis out literally as a string\n(you probably want to convert it to a Date and then return a custom string instead). It also specifies a custom channel\nwhich writes to the console pre-fixed by some text. However, all the options can be fully customized to your needs, so\nyou can for example write to something else completely.\n\n### Channels\n\nIn the previous section we already briefly touched on the concept of channels. In this section we will look into more\ndetail what it means and how they can be used to customize your logging if needed.\n\nUsing the standard settings a provider uses a predefined `LogChannel`, which logs to console (from `DefaultChannels`\nto be exactly).\n\nThere are two type of channels that can be used for configuration:\n\n- `LogChannel`\n- `RawLogChannel`\n\nUse a custom **LogChannel** if you want to write a pre-formatted message (and possibly error stack) to another\nplace than the default console. The LogChannel is defined as follows.\n\n```typescript\nexport interface LogChannel {\n\n  readonly type: \"LogChannel\";\n\n  /**\n   * Write a complete LogMessage away, the LogMessage is\n   * ready and formatted.\n   */\n  readonly write: (msg: LogMessage) => void;\n}\n```\n\nEssentially it expects you to provide the `write` function. The `type` (\na [discriminating union](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions)) is solely\nthere to\ndistinguish between the different channels and is always `\"LogChannel\"` for a `LogChannel`. The write function is called\nwith for each `LogMessage`, and contains a message and optional error (formatted as stack). We have\nalready seen how to create a custom LogChannel in the previous section (have a look above if you didn't read it yet).\n\nThe **RawLogChannel** can be used for more advanced scenarios. It allows us to completely format the message in any way\nwe want as well as writing it elsewhere. The RawLogChannel is defined as follows.\n\n```typescript\nexport interface RawLogChannel {\n\n  readonly type: \"RawLogChannel\";\n\n  /**\n   * Write the RawLogMessage away. The formatArg function can be used to format\n   * arguments from the RawLogMessage if needed. By default the formatArg function will\n   * use JSON.stringify(..), unless a global format function was registered\n   * in which case it uses that.\n   */\n  readonly write: (msg: RawLogMessage, formatArg: (arg: unknown) => string) => void;\n}\n```\n\nSimilar to LogChannel it expects you to provide the `write` function. The main difference here is that the\npassed `RawLogMessage` contains a lot of information on what is supposed to be logged. It is up to the implementer of\nthe function what to do with it and how to output it.\n\nThe `RawLogMessage` is defined as follows:\n\n```typescript\nexport interface RawLogMessage {\n\n  /**\n   * The level it was logged with.\n   */\n  readonly level: LogLevel;\n\n  /**\n   * Time of log statement in millis (since epoch)\n   */\n  readonly timeInMillis: number;\n\n  /**\n   * Contains the log name involved when logging (logger name or category name), by default it's always 1\n   * but can be more in some advanced cases.\n   */\n  readonly logNames: string | ReadonlyArray<string>;\n\n  /**\n   * Original user message, and only that. No log level, no timestamp etc.\n   */\n  readonly message: string;\n\n  /**\n   * Error if present.\n   */\n  readonly exception?: Error;\n\n  /**\n   * Additional arguments when they were logged, else undefined.\n   */\n  readonly args?: ReadonlyArray<unknown>;\n}\n```\n\nAs can be seen there are various data fields present. There are some utility format functions present to help out if\nneeded. These are `formatArgument` and `formatDate` which respectively format an argument and a time stamp as the\nlibrary does for a `LogChannel`.\n\nThe following code snippet creates a provider which uses a `RawLogChannel`.\n\n```typescript\nimport {LogLevel} from \"typescript-logging\";\nimport {Log4TSProvider} from \"typescript-logging-log4ts-style\";\n\nconst provider = Log4TSProvider.createProvider(\"ProviderWithCustomSettings\", {\n  channel: {\n    type: \"RawLogChannel\",\n    write: (msg, formatArg) => {\n      const date = new Date(msg.timeInMillis);\n      const dateStr = `${date.getDate()}-${date.getMonth() + 1}-${date.getFullYear()}`;\n      console.log(`${dateStr} ${LogLevel[msg.level]} ${msg.message}`);\n    },\n  },\n});\n```\n\nThe code above logs only the `LogLevel` and message of the incoming `RawLogMessage` and creates a custom date format for\nit (this logs the date in dd-MM-yyyy format). The example is of course simplified, but what you should pick up from this\nis that you can fully control how to format the raw data and where to write to.\n\nFor clarity, the examples inline the channels for clarity, but you can of course write separate functions and/or classes\nfor them as well if they get complex.\n\n## Dynamic control\n\nThis section gives an overview on how to dynamically control the log levels of your application. This means to change\nthe levels after the normal setup/configuration, at a certain point in time.\n\nThis is very useful if your application for a user encounters an issue. In order to find out what is wrong you can ask\nfor more information and tell the customer to enable certain parts of the logging and reproduce their problem with debug\nlogging enabled.\n\nThere are two ways to achieve this.\n\n- [Programmatically by your application](#programmatic control)\n- [Externally using the Log4TSControl](#external control)\n\n### Programmatic control\n\nThis allows *your* application to take matters in its own hands. You could add some option to change logging for example\nfrom the user interface of the application. You would do that then by changing the runtime settings of various LogGroups\nfor a provider.\n\nThe Log4TSProvider exposes two functions for this purpose:\n\n```typescript\ninterface Log4TSProvider {\n  // Docs left out for clarity (see your IDE code insight when using Log4TSProvider).\n  readonly updateRuntimeSettingsGroup: (identifier: string, settings: Omit<RuntimeSettings, \"channel\">) => void;\n  readonly updateRuntimeSettings: (settings: RuntimeSettings) => void;\n}\n```\n\nThe function `updateRuntimeSettings` allows changing the level for all groups and loggers of this provider. This applies\nto already created loggers and new ones by default.\n\nThe function `updateRuntimeSettingsGroup` allows a change of log level only, for given identifier of a group. The\nidentifier of a group can be set when configured.\n\nThe following snippet will change the log level to `Trace` for all existing loggers and new loggers.\n\n```typescript\n// Assume provider is a Log4TSProvider\nprovider.updateRuntimeSettings({level: LogLevel.Trace});\n```\n\n### External control\n\nThis allows you to control the logging dynamically, but externally through the browser console running your client\napplication.\n\nThis is available as function `LOG4TS_LOG_CONTROL` and can be imported from the library. This can then be used like:\n\n```typescript\nimport {LOG4TS_LOG_CONTROL} from \"typescript-logging-log4ts-style\";\n\nconst control = LOG4TS_LOG_CONTROL();\ncontrol.help(); // Shows help on how to get started\nconst controlProvider = control.getProvider(\"MyProviderName\");\ncontrolProvider.help(); // Shows help for control provider\ncontrolProvider.showSettings(); // Will print current settings of the provider\ncontrolProvider.update(\"debug\"); // Updates all existing loggers (and new ones) to debug\ncontrolProvider.update(\"trace\", 5); // Updates 5th group of showSettings() to trace (can also pass identifier of group)\ncontrolProvider.save(); // Save current state of loggers state to localStorage\ncontrolProvider.reset(); // Resets to state of when control provider was fetched first\n\n/* Restores to the saved state, this can be done at any time also after a browser restart, provided localStorage is available */\ncontrolProvider.restore();\n```\n\nThis is by default not available to the client as it needs to be your choice whether to expose this in the browser\nconsole or not. In order to do this, it comes down to one of:\n\n- Expose it in the index.ts(x) of your application and make sure your bundler exports it by prefixing with a variable\n  for example (recommended).\n- Expose it on the window in some fashion\n\n#### Expose using Webpack example\n\nThe following section shows how to export the `LOG4TS_LOG_CONTROL` function using Webpack, and make it available in the\nbrowser console. This allows it to be used in a client application when you need to debug something that is already\ndelivered to a customer.\n\n```typescript\n/* Your src/index.ts(x) */\nexport {LOG4TS_LOG_CONTROL} from \"typescript-logging-log4ts-style\";\n```\n\nNow make sure Webpack creates a bundle that exposes the index (simplified as ts-loaders etc. are left out, but it shows\nthe relevant part on how to expose it).\n\n```javascript\n/* webpack.config.js */\nconst path = require(\"path\");\n\nmodule.exports = {\n  entry: \"./src/index.ts\",\n  output: {\n    path: path.resolve(__dirname, \"dist\"),\n    filename: \"myapp.js\",\n    library: \"myapp\",\n  },\n};\n```\n\nNow when you'd open your application in your browser, open the console - you can type:\n\n```javascript\n/* Console of your application */\nconst control = myapp.LOG4TS_LOG_CONTROL();\ncontrol.help();\n// etc.\n```\n\n#### Expose using Rollup example\n\nThe following section shows how to export the `LOG4TS_LOG_CONTROL` function using Rollup, and make it available in the\nbrowser console. This allows it to be used in a client application when you need to debug something that is already\ndelivered to a customer.\n\n```typescript\n/* Your src/index.ts(x) */\nexport {LOG4TS_LOG_CONTROL} from \"typescript-logging-log4ts-style\";\n```\n\nNow make sure Rollup creates a bundle that exposes the index (simplified as plugins are left out, but it shows the\nrelevant part on how to expose it).\n\n```javascript\n/* rollup.config.js */\nexport default {\n  input: \"src/index.ts\",\n  output: [\n    {\n      file: \"dist/myapp.js\",\n      name: \"myapp\",\n      format: \"iife\",\n    },\n  ],\n};\n```\n\nNow when you'd open your application in your browser, open the console - you can type:\n\n```javascript\n/* Console of your application */\nconst control = myapp.LOG4TS_LOG_CONTROL();\ncontrol.help();\n// etc.\n```\n\n#### Expose on window manually\n\n```typescript\n/* Your src/index.ts(x) */\nimport {LOG4TS_LOG_CONTROL} from \"typescript-logging-log4ts-style\";\n\nif (window !== undefined) {\n  (window as any).appLogControl = LOG4TS_LOG_CONTROL;\n}\n```\n\nThe above code exposes \"appLogControl\" on the global window object if it exists. When it does the logging can be\naccessed in the browser's console as follows:\n\n```javascript\n/* Console of your application */\nconst control = appLogControl();  // or: window.appLogControl()\ncontrol.help();\n// etc.\n```\n","readmeFilename":"README.MD"}