{"id":19398955,"url":"https://github.com/eldersantos/winston-postgre","last_synced_at":"2025-04-24T06:31:38.309Z","repository":{"id":19253474,"uuid":"22489132","full_name":"eldersantos/winston-postgre","owner":"eldersantos","description":"A winston transporter for PostgreSQL database","archived":false,"fork":false,"pushed_at":"2016-04-11T19:59:42.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T16:34:44.981Z","etag":null,"topics":["database","javascript","npm-package","postgresql-database","schema","winston-postgre","winston-transport"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eldersantos.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":"2014-07-31T23:45:11.000Z","updated_at":"2018-04-02T18:48:52.000Z","dependencies_parsed_at":"2022-08-01T04:37:53.727Z","dependency_job_id":null,"html_url":"https://github.com/eldersantos/winston-postgre","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldersantos%2Fwinston-postgre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldersantos%2Fwinston-postgre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldersantos%2Fwinston-postgre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldersantos%2Fwinston-postgre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldersantos","download_url":"https://codeload.github.com/eldersantos/winston-postgre/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250407711,"owners_count":21425549,"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":["database","javascript","npm-package","postgresql-database","schema","winston-postgre","winston-transport"],"created_at":"2024-11-10T11:07:45.353Z","updated_at":"2025-04-24T06:31:38.078Z","avatar_url":"https://github.com/eldersantos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"winston-postgre\n===============\n\nA winston transporter for PostgreSQL database\n\nInstallation\n------------\n\n``` bash\nnpm install winston-postgre\n```\n\nAlso, you need to have a table on your postgre database with the following structure:\n``` sql\nCREATE TABLE nodelogs\n(\n  logdate timestamp without time zone,\n  level text,\n  message text,\n  meta text\n);\n```\n\n\nOptions\n------------\n\n* __connectionString:__ The PostgreSQL connection string.\n* __schema:__ The schema which the table was created.\n* __table:__ The table name inside the database under the schema.\n* __level:__ The winston log level\n\nSee the default values used as example:\n``` js\nvar options = {\n  \"connectionString\" : \"postgres://username:password@localhost/database\",\n  \"schema\" : \"public\", //default\n  \"table\" : \"nodelogs\", //default\n  \"level\" : \"silly\" //default level = info\n};\n```\n\nUsage\n------------\n\n``` js\nvar winston = require('winston');\nrequire('winston-postgre');\n\nvar options = {\n  \"connectionString\" : \"postgres://username:password@localhost/database\",\n  \"schema\" : \"public\",\n  \"table\" : \"nodelogs\",\n  \"level\" : \"silly\"\n};\n\nwinston.add(winston.transports.PostgreSQL, options);\n\nwinston.log('error', 'Just a simple error log');\nwinston.log('info', 'Just a simple info log');\nwinston.log('warn', 'Just a simple warn log');\nwinston.log('debug', 'Just a simple debug log');\nwinston.log('verbose', 'Just a simple verbose log');\n```\n\nFeel free to open an issue or do a pull request.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldersantos%2Fwinston-postgre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldersantos%2Fwinston-postgre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldersantos%2Fwinston-postgre/lists"}