{"id":27259523,"url":"https://github.com/pnxtech/hydra-plugin-hls","last_synced_at":"2025-04-11T04:06:05.196Z","repository":{"id":57269849,"uuid":"125127738","full_name":"pnxtech/hydra-plugin-hls","owner":"pnxtech","description":"Hydra Plugin for use with the Hydra Logging Service","archived":false,"fork":false,"pushed_at":"2018-03-26T18:03:23.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T04:06:02.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pnxtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-13T23:30:10.000Z","updated_at":"2020-10-13T19:55:47.000Z","dependencies_parsed_at":"2022-09-02T09:51:20.314Z","dependency_job_id":null,"html_url":"https://github.com/pnxtech/hydra-plugin-hls","commit_stats":null,"previous_names":["cjus/hydra-plugin-hls"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnxtech%2Fhydra-plugin-hls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnxtech%2Fhydra-plugin-hls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnxtech%2Fhydra-plugin-hls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnxtech%2Fhydra-plugin-hls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnxtech","download_url":"https://codeload.github.com/pnxtech/hydra-plugin-hls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339281,"owners_count":21087215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-04-11T04:06:04.591Z","updated_at":"2025-04-11T04:06:05.181Z","avatar_url":"https://github.com/pnxtech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hydra-plugin-hls\nHydra Plugin for use with the [Hydra Logging Service](https://github.com/cjus/hydra-logging-svcs). This plugin adds a log function to hydra and overrides the hydraExpress.log call in order to send log messages to the Hydra Distributed Logging Service.\n\n## Service configuration entry\n\nConfigure this plugin by adding a plugins/hydraLogger branch to your hydra configuration. The `logToConsole` entry determines whether the logging is visible in the terminal window your service is running in. The `onlyLogLocally` entry determines whether log entries only appear locally and are not sent to the remote Hydra Logging Service.  Ideally, both entries are set to true, but you may choose to only set `onlyLogLocally` to true, while you're debugging your service locally.\n\n```\n  \"hydra\": {\n    \"serviceName\": \"your-service\",\n    \"serviceIP\": \"\",\n    \"servicePort\": 8080,\n    \"serviceType\": \"\",\n    \"serviceDescription\": \"your service description\",\n    \"plugins\": {\n      \"hydraLogger\": {\n        \"logToConsole\": true,\n        \"onlyLogLocally\": false\n      }\n    }\n  }\n```\n\n## Using the plugin in your service.\n\nThis plugin can be used with hydra or hydra-express. To use the plugin you only need to call the hydra or hydraExpress log method. The first param is a log type such as 'error', 'fatal', 'info', 'debug'. You can use a custom log type if you need to.  The second param is either a string or an object.\n\n```\nhydra.log('error', 'Oh snap');\nhydra.log('info', {\n  name: 'Info object'\n});\n```\n\n## Configure for use with Hydra:\n\n```js\nconst hydra = require('hydra');\nconst HydraLogPlugin = require('hydra-plugin-hls/hydra');\nhydra.use(new HydraLogPlugin);\n:\n:\n: later\nhydra.log('error', 'Oh snap!');\n```\n\n## Configure for use with Hydra-Express:\n\n```js\nconst hydraExpress = require('hydra-express');\nconst HydraLogPlugin = require('hydra-plugin-hls/hydra-express');\nhydraExpress.use(new HydraLogPlugin);\n:\n:\n: later\nhydraExpress.log('error', 'Oh snap!');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnxtech%2Fhydra-plugin-hls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnxtech%2Fhydra-plugin-hls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnxtech%2Fhydra-plugin-hls/lists"}