
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
cms_applog_models
Advanced tools
#This Beta Test Please Skip
npm i cms_applog_models
See this link click
applog.js
const { ApplogModel } = require('cms_applog_models');
let logOptions = {
filename:'applogTest.log',
maxLogSize:10000, // max size of log file
backups:3 // num of backup file
}
let ApplogConfig = {
self_system: 'test',
self_group: 'test',
self_type: 'test'
}
let mode = 'normal'
exports.Log = class extends LogBeats{
constructor(){
super(ApplogConfig,logOptions,mode);
}
}
test.js
const { Log } = require('./applog');
let applog = new Log();
applog.setMessage('Test')
.setRequest({ code: 200, message: 'success' })
.setEnvironment('local')
.setSelfFunction('test')
.sendIgnoreResponse(1);
applog.js
const { createMiddlewareBeats } = require('cms_applog_models');
let logOptions = {
filename:'applogTest.log',
maxLogSize:10000, // max size of log file
backups:3 // num of backup file
}
let ApplogConfig = {
self_system: 'test',
self_group: 'test',
self_type: 'test'
}
let mode = 'loadtest'
exports.logMiddleware = createMiddlewareBeats(ApplogConfig,logOptions,mode);
index.js
const express = require('express');
const app = express();
const { logMiddleware } = require('./applog');
app.get('/test',logMiddleware,(req,res)=>{
setTimeout(() => {
res.send({code:200}).saveLog('Hello')
}, 3000);
});
app.listen(3000,()=>{
console.log('Listen on port: ' + 3000);
});
filename
: Log namemaxLogSize
: Max size of log filebackups
: Num of Backup fileself_system
: system nameself_group
: group of systemself_type
: type of systemnormal
: defaultloadtest
: not send log in this modeFAQs
cms applog v2 model
The npm package cms_applog_models receives a total of 8 weekly downloads. As such, cms_applog_models popularity was classified as not popular.
We found that cms_applog_models 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.