You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

loghere

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loghere - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+0
-0
.editorconfig

@@ -0,0 +0,0 @@ # EditorConfig

@@ -0,0 +0,0 @@ {

+7
-0

@@ -54,2 +54,9 @@ 'use strict'

log(content) {
const currentLevel = 'ALL'
if (this.isActive(currentLevel)) {
console.log(`[${Logger.getTime()}] [${currentLevel}] ${content}`)
}
}
debug(content) {

@@ -56,0 +63,0 @@ const currentLevel = 'DEBUG'

@@ -51,2 +51,3 @@ 'use strict'

/** 得到格式化的时间格式,格式示例: 2020-10-10 15:30:34 */
getFormattedTime() {

@@ -53,0 +54,0 @@ const formatted = `${this.getFullYear()}-${this.getFullMonth()}-${this.getFullDay()} ${this.getFullHour()}:${this.getFullMinute()}:${this.getFullSecond()}`

@@ -0,0 +0,0 @@ MIT License

+1
-1
{
"name": "loghere",
"version": "1.0.1",
"version": "1.0.2",
"description": "可以在 PM2 和 Serverless 中使用的一款简易日志工具",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -18,3 +18,16 @@ # loghere

const logger = loghere.getLogger() // 获取日志实例
logger.log('这是日志内容') // 打日志
logger.level = 'debug' // 设置日志等级
logger.debug('这是日志内容') // 打日志
```
## 日志等级
包含以下日志等级:
1. ALL (默认)
2. TRACE
3. DEBUG
4. INFO
5. WARN
6. ERROR
7. FATAL
8. MARK
9. OFF