{"id":38821119,"url":"https://github.com/chl03ks/dcos-logging-node","last_synced_at":"2026-06-11T20:25:43.313Z","repository":{"id":57156600,"uuid":"88079876","full_name":"chl03ks/dcos-logging-node","owner":"chl03ks","description":"Node.js client library lightweigth for DCOS Logging API. ES6","archived":false,"fork":false,"pushed_at":"2017-04-20T14:45:36.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-17T22:15:35.431Z","etag":null,"topics":["dcos","dcos-cli","es6","javascript","lightweight","marathon","mesos","node","nodejs","npm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chl03ks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-12T17:42:08.000Z","updated_at":"2019-02-19T21:07:46.000Z","dependencies_parsed_at":"2022-08-30T05:32:11.565Z","dependency_job_id":null,"html_url":"https://github.com/chl03ks/dcos-logging-node","commit_stats":null,"previous_names":["owndann/dcos-logging-node"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chl03ks/dcos-logging-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl03ks%2Fdcos-logging-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl03ks%2Fdcos-logging-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl03ks%2Fdcos-logging-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl03ks%2Fdcos-logging-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chl03ks","download_url":"https://codeload.github.com/chl03ks/dcos-logging-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl03ks%2Fdcos-logging-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34217312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dcos","dcos-cli","es6","javascript","lightweight","marathon","mesos","node","nodejs","npm"],"created_at":"2026-01-17T13:04:52.592Z","updated_at":"2026-06-11T20:25:43.289Z","avatar_url":"https://github.com/chl03ks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DCOS Logging API Node.js Client Library\n\nNode.js client library lightweigth for DCOS Logging API. ES6\n\nInstall\n\nInstall using npm or yarn\n\n```\n$ npm install dcos-logging-node\n$ yarn add dcos-logging-node\n```\n\n# Usage\n\n```javascript\n\nconst dcosLogging = require('../lib/index')(\n    {\n        dcosHost: 'DCOS_HOST',\n        dcosProtocol: 'https'\n    },{\n        headers: {\n            'Authorization': 'token=DCOS_ACCESS_TOKEN'\n            /*\n             You can get the access Token in the DCOS cli Using\n             $ dcos config show core.dcos_acs_token\n             */\n        }\n    });\n\ndcosLogging.range.get(null, 'text/plain', false, {skip_prev: 200, limit: 3})\n    .then(logs =\u003e console.log(logs))\n    .catch(err =\u003e console.error(err));\n```\n\n## Format\n\n\nIn the methods you will neet to discribe the Accept Header.\nThe API request header can be any the following:\n\n- `text/plain`, `text/html`, `*/*` request logs in text format, ending with `\\n`.\n- `application/json` request logs in JSON format.\n- `text/event-stream` request logs in Server-Sent-Events format.\n\n# Stream\n\nYou can get a readble Stream object from any end point in the Logging API\n\n```javascript\n\ndcosLogging.range.get(null, 'text/event-stream', true)\n    .then((stream) =\u003e {\n        // Forces the stream to receive a String instead of a Buffer object\n        stream.setEncoding('utf-8');\n        // Event that receives data from DCOS\n        stream.on('data', (chunk) =\u003e {\n            // Printing the chunk received from the stream\n            console.log(chunk);\n        });\n\n        // Last chunk, it runs when the connection is closed\n        stream.on('end', () =\u003e {\n            // Here you do what you need when it ends...\n        });\n\n        // If for some reason we receive an error while connected, we can handle it here\n        stream.on('errror', (err) =\u003e {\n            // Error handling...\n        })\n    }).catch((err) =\u003e console.log(err));\n\n```\n\n## Methods\n\n\u003e Note: If the AcceptHeader is `text/event-stream` you will need to set the `RequestStream` param to false\n\n### Range\n\n\n- `get(agentId, acceptHeader, requestStream, parameters)`\n- `download(agentId, acceptHeader, requestStream, parameters)`\n- `framework(agentId,frameworkId, executorId, containerId, acceptHeader, requestStream, parameters)`\n- `frameworkDownload(agentId, frameworkId, executorId, containerId, acceptHeader, requestStream , parameters)`\n\n### Stream\n\n-  `get(agentId, AcceptHeader, requestStream, parameters)`\n-  `framework(agentId, frameworkId, executorId, containerId, acceptHeader, requestStream)`\n\n### Fields\n\n- `get(agentId, field, acceptHeader, requestStream, parameters)`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchl03ks%2Fdcos-logging-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchl03ks%2Fdcos-logging-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchl03ks%2Fdcos-logging-node/lists"}