{"id":19520168,"url":"https://github.com/dai1254473705/node-logger-easy","last_synced_at":"2026-05-08T07:31:39.797Z","repository":{"id":65460869,"uuid":"160895370","full_name":"dai1254473705/node-logger-easy","owner":"dai1254473705","description":"Export the log to the console or file, customize the output log format, support sending mail to the designated mailbox;","archived":false,"fork":false,"pushed_at":"2019-01-28T08:57:12.000Z","size":516,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-10T13:55:42.440Z","etag":null,"topics":["email","express","file","javascript","koa","log","logger","logs","node","node-logger-easy"],"latest_commit_sha":null,"homepage":null,"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/dai1254473705.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md/LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-08T02:13:50.000Z","updated_at":"2019-01-28T08:56:10.000Z","dependencies_parsed_at":"2023-01-24T15:05:13.569Z","dependency_job_id":null,"html_url":"https://github.com/dai1254473705/node-logger-easy","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.3125,"last_synced_commit":"24ec453520a81eff8d9226355024af3f4fe8264a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/dai1254473705/node-logger-easy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Fnode-logger-easy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Fnode-logger-easy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Fnode-logger-easy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Fnode-logger-easy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dai1254473705","download_url":"https://codeload.github.com/dai1254473705/node-logger-easy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Fnode-logger-easy/sbom","scorecard":{"id":316988,"data":{"date":"2025-08-11","repo":{"name":"github.com/dai1254473705/node-logger-easy","commit":"24ec453520a81eff8d9226355024af3f4fe8264a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T00:25:35.870Z","repository_id":65460869,"created_at":"2025-08-18T00:25:35.870Z","updated_at":"2025-08-18T00:25:35.870Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32770980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["email","express","file","javascript","koa","log","logger","logs","node","node-logger-easy"],"created_at":"2024-11-11T00:24:09.720Z","updated_at":"2026-05-08T07:31:39.778Z","avatar_url":"https://github.com/dai1254473705.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-logger-easy\nExport the log to the console or file, customize the output log format, support sending mail to the designated mailbox;\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n\n## description\n\nIf you want to see more:\n\t\n\t- 1. 'git clone git@github.com:dai1254473705/node-logger-easy.git';\n\t\n\t- 2. 'npm install'\n\t\n\t- 3. 'npm run test'\n\n## Installation\n\n```sh\n`npm install node-logger-easy --save` \nor `cnpm install node-logger-easy --save` \nor `yarn add node-logger-easy`\n```\n\n## colors\n\n\u003e all colors :\n\n+ 'black'\n+ 'red'\n+ 'green'\n+ 'yellow'\n+ 'blue'\n+ 'magenta'\n+ 'cyan'\n+ 'white'\n+ 'gray'\n+ 'redBright'\n+ 'greenBright'\n+ 'yellowBright'\n+ 'blueBright'\n+ 'magentaBright'\n+ 'cyanBright'\n+ 'whiteBright'\n\n![colors](./src/images/color.jpg)\n\n\n## example\n\n```sh\n/**\n * test\n * index.js\n */\nconst nodeLoggerEasy = require('../index');\nconst logger = new nodeLoggerEasy({\n    format: {\n        datePattern: 'YYYYMMDDHHmmss',\n        extension: 'log',// [log,txt]file extension\n        type: 'jsonString', // string || json(no color) || jsonString \n        params: ['time','serverIp','level','message','pid'], //set default log params\n        paramsTimeFormat: 'YYYY年MM月DD日HH时mm分ss秒',// logs time format,use moment.js ,for example[YYYYMMDDHHmmss,YYYY年MM月DD日HH时mm分ss秒]\n        console: true, // if you want see the logs in terminal; default:true\n    },\n    // if you want to out put log to file\n    file: {\n        save: true, // is create log files,default:false \n        path: './logs/',// logs dir path,auto create dir\n        saveLevel: ['error','warn'],//set the level you want to save,default: [] , all level: ['trance', 'debug', 'info', 'warn', 'error', 'fatal']\n        saveDay: 7,// save days,if '0',will not delete;default : 0\n    },\n    // set color if you like \n    // ['black','red','green','yellow','blue','magenta','cyan','white','gray','redBright','greenBright','yellowBright','blueBright','magentaBright','cyanBright','whiteBright']\n    color: {\n        trance: 'yellow',\n        debug: 'blue',\n        info: 'cyan',\n        warn: 'white',\n        error: 'gray',\n        fatal: 'redBright'\n    },\n    // you should set false or not set on production env;\n    debug: true // some logs\n});\nmodule.exports = logger;\n```\n\n### use\n\n```sh\nlogger.trance('哈哈哈哈哈哈哈',{color: 'blue'});\nlogger.debug('哈哈哈哈哈哈哈',{color: 'redBright'});\nlogger.info('哈哈哈哈哈哈哈');\nlogger.warn('哈哈哈哈哈哈哈');\nlogger.error('哈哈哈哈哈哈哈');\nlogger.fatal('哈哈哈哈哈哈哈');\nlogger.warn({haha: 213,asdf: 'sdf'},{color: 'blue',json: true});\n```\n\n+ jsonString format\n\n![jsonString](./src/images/jsonString.png)\n\n+ json format\n\n![json](./src/images/json.png)\n\n+ string format\n\n![string](./src/images/string.png)\n\n+ logs file \n\n![logs file](./src/images/logfile.png)\n\n### method \n\n\u003e logger\\[level](message,options);\n\n+ messages:\n\n\t---logger.info(String);\n\t\n\t---logger.info(String,options);\n\t\n\t---logger.info(Object);\n\t\n\t---logger.info(Object,options);\n\n+ options\n\n\u003e {color: 'blue'}\n\nYou can specify the log color of the current output，Only show color in terminal；\n\n\u003e all levels: ['trance', 'debug', 'info', 'warn', 'error', 'fatal']\n\n+ logger.trance\n+ logger.debug\n+ logger.info\n+ logger.warn\n+ logger.error\n+ logger.fatal\n\n### attention\nemail Not completed, ongoing updates\n\n## License\n\n[MIT](LICENSE)\n\nCopyright (c) 2018-present, Yunzhou Dai\n\n[npm-image]: https://img.shields.io/npm/v/node-logger-easy.svg\n[npm-url]: https://npmjs.org/package/node-logger-easy\n[node-version-url]: https://nodejs.org/en/download/\n[node-version-image]: https://img.shields.io/node/v/node-logger-easy.svg\n[downloads-image]: https://img.shields.io/npm/dm/node-logger-easy.svg\n[downloads-url]: https://npmjs.org/package/node-logger-easy","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdai1254473705%2Fnode-logger-easy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdai1254473705%2Fnode-logger-easy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdai1254473705%2Fnode-logger-easy/lists"}