
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A simple logging system written in typescript. System allows to display logs in terminal in selected fully configurable sequences. Supports bash colours. Additional configuration is possible via .ratlog.js file where you can create your own reneders and methods used in them
sample: [@{green bold}#{time}@{normal}]
@{} - style socket
#{} - function socket
@{red underline} - after this socket text will be red and underline
#{time} - this socket will be replaced by [HH:MM:SS]
#{.} - this socket will be replaced by content in logger function
#{:} - this socket will be replaced by content in socket function
// sample main.ts
// app function #1
const app = async () => {
logger.log('hehe nice')
logger.warning('hehe.. a little worse')
logger.error('oh boi... dragons!')
}
app()

// sample .ratlog.js file
module.exports = {
logger: {...}
methods: {
time_endpoint: () => { return '[@{blue bold}#{time}@{normal}]' },
text_status: (text) => { return `@{normal}| Status: @{${text === 'ok' ? 'green' : 'red'} bold}#{:} @{normal}|` }
},
renders: {
endpoint: {
render: [
'#{time_endpoint}|>',
'@{yellow}#{.}'
]
}
}
}
// sample main.ts
import ratlog from './.ratlog.js';
// app function #2
const app = async () => {
loggerConfig(ratlog)
logger.endpoint('ok boomer #{text_status(ok)}')
logger.endpoint('ok boomer #{text_status(no ok)}')
}
app()

// sample .ratlog.js file
module.exports = {
logger: {
dir: 'logs',
filename: () => {
const time = new Date()
const timeHMS = [time.getDay(), time.getMonth()]
return `ratlog_${timeHMS.map((item) => `0${item}`.slice(-2)).join('-')}`
},
extension: 'rat',
algorithm: 'aes-256-ctr',
secret: 'd47424114c7f3c8df4fa7205c83ff0bd'
},
methods: {...},
renders: {...}
}

logger.dir empty as ''[nofile] in args - on the end of args. Sample:logger.log('yoyo', '[nofile]')
decodeFile// sample main.ts
import ratlog from './.ratlog.js';
// app function #2
const app = async () => {
loggerConfig(ratlog)
await decodeFile(path.resolve('./logs/ratlog_04-01.rat'), secret, algorithm)
// secret and algorithm from config
}
app()
\n logger.log('yoyo', '[nofile]')
logger.log('\n', 'yoyo', '[nofile]', '\n')
logger.log('\n', 'yoyo')

FAQs
log system in typescript
We found that ratlogger 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.