Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
apex-logs-winston
Advanced tools
[Apex Logs](https://apex.sh/logs/) transport for the popular [Winston](https://github.com/winstonjs/winston) Node.js logging framework.
Apex Logs transport for the popular Winston Node.js logging framework.
npm install --save apex-logs-winston
Logs are buffered in memory and flushed periodically for more efficient ingestion. By default a maxEntries
of 250, and flushInterval
of 5 seconds (5000) are used.
const ApexLogsTransport = require('apex-logs-winston')
const winston = require('winston')
const apex = new ApexLogsTransport({
url: process.env.APEX_LOGS_URL,
authToken: process.env.APEX_LOGS_AUTH_TOKEN,
projectId: process.env.APEX_LOGS_PROJECT_ID,
})
const logger = winston.createLogger({
levels: winston.config.syslog.levels,
transports: [apex],
defaultMeta: { program: 'api', host: 'api-01' }
})
logger.info('User Login', { user: { name: 'Tobi Ferret' } })
Here's an example tuning the default buffering options:
const apex = new ApexLogsTransport({
url: process.env.APEX_LOGS_URL,
authToken: process.env.APEX_LOGS_AUTH_TOKEN,
projectId: process.env.APEX_LOGS_PROJECT_ID
buffer: { maxEntries: 100, flushInterval: 5000 }
})
Services such as Heroku and AWS Lambda expect logs to be written to stdout, in these cases use json: true
to simple output an Apex Logs-friendly JSON format:
const apex = new ApexLogsTransport({ json: true })
Note that the other options do not apply in this situation.
FAQs
[Apex Logs](https://apex.sh/logs/) transport for the popular [Winston](https://github.com/winstonjs/winston) Node.js logging framework.
The npm package apex-logs-winston receives a total of 20 weekly downloads. As such, apex-logs-winston popularity was classified as not popular.
We found that apex-logs-winston 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.