Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
jj-log is a JSON logger that's as extendable as you want it to be.
$ npm install jj-log
var jjLog = require( 'jj-log' )
var log = jjLog()
log( 'something happened!' )
// >> {"message":"something happened!", "timestamp":1430337665558}
var jjLog = require( 'jj-log' )
var log = jjLog()
log({
type: 'user_created',
user: 'billbob@bill.com'
})
// >> {"type":"user_created", "user": "billbob@bill.com", "timestamp":1430337665558}
var jjLog = require( 'jj-log' )
var log = jjLog({
timestamps: false
})
log({
message: 'hello'
})
// >> {"message":"hello"}
var jjLog = require( 'jj-log' )
var log = jjLog({
timestamps: false,
defaults: {
level: 'info',
package: 'jj-log'
}
})
log({
message: 'hello'
})
// >> {"message":"hello","level":"info","package":"jj-log"}
var jjLog = require( 'jj-log' )
var log = jjLog({
timestamps: false,
methods: {
fatal: {
level: 'fatal',
shouldWePanic: 'absolutely'
},
warn: {
level: 'warn',
shouldWePanic: 'probably not'
}
}
})
log.warn({
message: 'hello'
})
// >> {"message":"hello","level":"warn","shouldWePanic":"probably not"}
log.fatal({
message: 'hello'
})
// >> {"message":"hello","level":"fatal","shouldWePanic":"absolutely"}
var fatalErrorsSoFar = 0
var jjLog = require( 'jj-log' )
var log = jjLog({
timestamps: false,
methods: {
fatal: {
level: 'fatal',
errorNumber: function(){
return fatalErrorsSoFar++
}
}
}
})
log.fatal({
message: 'oops'
})
// >> {"message":"oops","level":"fatal","errorNumber":1}
log.fatal({
message: 'oops again'
})
// >> {"message":"oops again","level":"fatal","errorNumber":2}
var jjLog = require( 'jj-log' )
var log = jjLog({
timestamps: false,
defaults: {
level: 'info'
},
methods: {
warn: {
level: 'warn'
}
}
})
log()
// >> {"level":"info"}
log({
level: 'uh oh'
})
// >> {"level":"uh oh"}
log.warn()
// >> {"level":"info"}
log.warn({
level: 'a bit worse this time'
})
// >> {"level":"a bit worse this time"}
var jjLog = require( 'jj-log' )
var log = jjLog({
silent: true
})
log()
// >> no output
This can also be acheived by setting the SILENCE_JJ_LOG environment variable to true
FAQs
Json logging module
The npm package jj-log receives a total of 0 weekly downloads. As such, jj-log popularity was classified as not popular.
We found that jj-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.