{"_id":"@acteam-it/winston-socket.io","_rev":"2-2f7f4bbcdd1d88d93ccd839ba7ae7453","name":"@acteam-it/winston-socket.io","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@acteam-it/winston-socket.io","version":"0.1.0","description":"A winston transport that will emit logs to a socket.io server.","main":"lib/winston-socketio.js","types":"lib/winston-socketio.d.ts","repository":{"type":"git","url":"git+https://github.com/julientaverne/winston-socket.io.git"},"keywords":["winstonjs","socket.io","log"],"author":{"name":"jtaverne"},"license":"MIT","bugs":{"url":"https://github.com/julientaverne/winston-socket.io/issues"},"homepage":"https://github.com/julientaverne/winston-socket.io#readme","dependencies":{"socket.io-client":"^2.3.0","socket.io-encrypt":"^0.2.1","winston":"^3.3.3","winston-transport":"^4.4.0"},"devDependencies":{"chai":"^4.2.0","express":"^4.17.1","gulp":"^4.0.2","gulp-eslint":"^6.0.0","gulp-mocha":"^7.0.2","mocha":"^7.0.0","socket.io":"^2.3.0"},"engines":{"node":">= 8.0.0"},"directories":{"example":"examples","lib":"lib","test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"db59bdefbf0895c5d704ccd3f12d1e61239184bd","_id":"@acteam-it/winston-socket.io@0.1.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Ij0rFAp8tD7EihF3Gc2+N5Nt3zyYYlA6LzxYsXwM27tQhCU8ZzPfc1oL/fXaf3afhHFgb7SEarMhBEFuAH9UZQ==","shasum":"20fdc37acc5595f0db4b824b7aa1a88a560034cb","tarball":"https://registry.npmjs.org/@acteam-it/winston-socket.io/-/winston-socket.io-0.1.0.tgz","fileCount":11,"unpackedSize":16413,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUPs4CRA9TVsSAnZWagAABEcQAJlN0NJIbFF/oXwew2fp\nLNrYUprPBoVB5i0V7CON9jFPPMA5qVvwLG2tmWWRMQxYXGy+RMACbSeeX5UE\nBYOrF+3KkC1U7Sa//r6N7BuBk2Nzsvhda1Rs2/b5uOEjG1O+XGEzMelbUYL9\nbUvnK5alenZf9dPwskjO6aAMFjU8xgV4ydqfcCA0Qjha5ISz7D7TK7nzP/06\n704D+Bsl7if5h9EolFoBbMHT30zyQFCW7IHC1h/YXWK1laG5eVXz51KWdptX\nHH1ebpQiefu7sQCtWYYFTXyOA+l4OX8a0tLeMOJdm2BUQeCC9XQCVpL7f/ot\nDTrtXwgknC1jbwIoHVqc8Hvc/wNsxNCUDlBmgr9HZejBkcTsevXwkGW8j9/H\nptIR2fJWEYfo0Gd9Sb8hIAd1jzRpdTBCeCmeu0zMPh7JiIEvbHekgV5cm0e1\ne+zz+UB60QP+H09q+x9rytslFceSRnJp0Q2OR1C9zTJNgbew71OSh7hP7n/y\n7Qn0MnSenFljdBFVbbr0hSVTttioAoXhoK4jn0UmSjfOdQhmyn/DPtyv+Ff9\nhYIGsnZuph6UUM/6Qoq8YJkohZQF6iR9KQRTv4n77w0q8kOAVHU+TlsQxy+v\nj1fsBm8nwwC9IQ6vWGGpyhDqPJk6qRTdvlorxCb3O0HMwPu8tZcCwCfAFgo+\nOuCb\r\n=U023\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqNU9djDxcqWtuai1zHXU02Ht5woX+ELq3KDBOArmEZQIhAMxtmBR0MZic8IGzdes3CO6ZkdAMAn6hKsRdDqdZnWVK"}]},"maintainers":[{"name":"jtaverne","email":"julien.taverne@gmail.com"}],"_npmUser":{"name":"jtaverne","email":"julien.taverne@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/winston-socket.io_0.1.0_1599142712240_0.37946557312669404"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-03T14:18:31.988Z","0.1.0":"2020-09-03T14:18:32.348Z","modified":"2022-04-04T11:17:04.658Z"},"maintainers":[{"email":"desvi.francisco@acteam-it.com","name":"dfrancisco"},{"email":"julien.taverne@gmail.com","name":"jtaverne"}],"description":"A winston transport that will emit logs to a socket.io server.","homepage":"https://github.com/julientaverne/winston-socket.io#readme","keywords":["winstonjs","socket.io","log"],"repository":{"type":"git","url":"git+https://github.com/julientaverne/winston-socket.io.git"},"author":{"name":"jtaverne"},"bugs":{"url":"https://github.com/julientaverne/winston-socket.io/issues"},"license":"MIT","readme":"# winston-socket.io\r\n\r\n![Build Status](https://travis-ci.org/jbass86/winston-socket.io.svg?branch=master) [![Dependency Status](https://david-dm.org/jbass86/winston-socket.io.svg)](https://david-dm.org/jbass86/winston-socket.io)\r\n\r\n\r\nA socket.io transport for winstonjs.  Gives you the ability to log directly to a socket.io server. \r\n\r\nSee the examples folder for more usage details.\r\n\r\n## Options\r\n\r\n* __host__: The hostname of the socket.io server __(default: http://localhost)__.\r\n* __port__: The port of the socket.io server __(default: 3000)__.\r\n* __secure__: Use https for the socket.io server connection __(default: false)__.\r\n* __reconnect__: Reconnect to socket.io server connection __(default: false)__.\r\n* __namespace__: The socket.io namespace to use for the logs __(default: \"log\")__.\r\n* __log_topic__: The topic to send the log messages on __(default: \"log\")__.\r\n* __encrypt__: Choose to encrypt winston socket logs or not __(default: false)__\r\n* __secret__: the passphrase to encrypt logs with [needs __encrypt__ to be __true__ to allow changing it ] __(default: null)__ \r\n* __log_format__: The format in which to log the information.\r\n* __max_queue_size__: The maximum number of messages to queue up for publishing if the client isnt connected to the server __(default: 1000)__.\r\n\r\n## How to use it\r\n\r\n``` js\r\n  const winston = require('winston');\r\n  require('winston-socket.io');\r\n\r\n  let logger = winston.createLogger({\r\n    level: \"info\",\r\n    transports: [\r\n      new winston.transports.Console(),\r\n      new winston.transports.SocketIO(\r\n        {\r\n          host: \"http://myhost\",\r\n          port: 8080\r\n          secure: true,\r\n          reconnect: true,\r\n          namespace: \"log\",\r\n          log_topic: \"log\"\r\n        }\r\n      )\r\n    ]\r\n  });  \r\n\r\n  logger.log(\"info\", \"I'm logging to the socket.io server!!!\");\r\n  logger.log(\"info\", \"I'm logging something else\", {meta: \"some additional info\"});\r\n```\r\n\r\nCan also be added to Winston as a transport in this method \r\n\r\n``` js\r\n\r\n  const winston = require('winston');\r\n  require('winston-socket.io');\r\n\r\n  winston.add(new winston.transports.SocketIO({\r\n    host: \"http://myhost\",\r\n    port: 8080\r\n    secure: true,\r\n    reconnect: true,\r\n    namespace: \"log\",\r\n    log_topic: \"log\"\r\n  }));\r\n","readmeFilename":"README.md"}