Installations
npm install @tosee/log
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
10.24.1
NPM Version
6.14.12
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
Developer
Download Statistics
Total Downloads
4,853
Last Day
1
Last Week
1
Last Month
9
Last Year
619
GitHub Statistics
2 Stars
88 Commits
1 Watching
1 Branches
1 Contributors
Package Meta Information
Latest Version
1.4.2
Package Id
@tosee/log@1.4.2
Unpacked Size
40.34 kB
Size
8.82 kB
File Count
18
NPM Version
6.14.12
Node Version
10.24.1
Total Downloads
Cumulative downloads
Total Downloads
4,853
Last day
0%
1
Compared to previous day
Last week
-66.7%
1
Compared to previous week
Last month
-86.2%
9
Compared to previous month
Last year
-32.5%
619
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
快速开始
logger.Middleware()
后的中间件里的logger打印都会带上该请求的唯一ID
import { Logger } from "@tosee/log"
import koa from 'koa';
const logger = new Logger('my namespace');
const app = new koa();
app.use(logger.Middleware());
app.use(async (ctx) => {
logger.info("test");
});
app.listen(3000);
output
[7831cef0-940c-11ea-ba2e-83ad967e8b38 2020-05-12 12:53:06] GET /
[7831cef0-940c-11ea-ba2e-83ad967e8b38 2020-05-12 12:53:06] test
自定义
import { Logger } from "@tosee/log"
import koa from 'koa';
const logger = new Logger('my namespace',{
withUID:Logger.templete`[${0}] [${1}] [${2}]`,
withoutUID:Logger.templete`[${0}] [${1}]`,
});
const app = new koa();
app.use(logger.Middleware());
app.use(async (ctx) => {
logger.info("test");
});
app.listen(3000);
output
[7831cef0-940c-11ea-ba2e-83ad967e8b38] [2020-05-12] [12:53:06] GET /
[7831cef0-940c-11ea-ba2e-83ad967e8b38] [2020-05-12] [12:53:06] test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
3 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/fullstackoverflow/log/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fullstackoverflow/log/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/fullstackoverflow/log/test.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/fullstackoverflow/log/test.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/release.yml:20
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:16
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
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
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 19 are checked with a SAST tool
Score
2.8
/10
Last Scanned on 2024-12-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More