{"repo":"sematext/logsene-js","free":true,"listed":false,"github":"https://github.com/sematext/logsene-js","clone":"git clone https://github.com/sematext/logsene-js.git","description":"Log shipping library for sending logs to Sematext from JavaScript apps","language":"JavaScript","stars":10,"topics":["logging","logs","log-collector","elk","elk-stack","log-management","javascript"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"JavaScript client for Sematext Logs. Installation npm install logsene-js --save Usage var Logsene = require('logsene-js') var logger = new Logsene ('LOGS-APP-TOKEN') logger.log ('info', 'text message', {tags: ['a','b'], customField: 'custom-field'}) Constructor Parameters - token - Logs App token. Sign up here. - type - Optional. Default type of your logs - please note you can define Elasticsearch mapping templates in Sematext Logs - url - Sematext Logs receiver URL (e.g. if you are shipping logs to Sematext Enterprise), defaults to - storageDirectory - Directory where to buffer logs in the case of failure - options : - useIndexInBulkUrl - If set to 'false' / bulk will be used /indexName/ bulk otherwise. - httpOptions - general HTTP/HTTPS options for the request, e.g. SSL key,cert,passphrase,ca,rejectUNauthorized etc. - silent - If set to true , logsene-js will not log debug and errors to stdout. Used for prod envs, but not mandatory. This is false by default. Special fields for indexing In general Elasticsearch 2.3 (including Sematext Logs) does not allow fields with leading underscore or dots in field names. Logsene-js converts such fields names (e.g. removing leading underscores, and replaces dots to underscores). However, a few fields are interpreted for indexing before renaming the fields: - type - used as ' type' in the index operation (bulk indexing) - id - used as ' id' in the index operation (bulk indexing) Environment variables - LOGS TMP DIR - Directory to store fa","default_branch":null,"files":null,"tree":[],"storefront":"/r/sematext","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sematext/logsene-js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}