securenow 7.6.6 → 7.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/NPM_README.md +13 -13
  2. package/README.md +21 -37
  3. package/app-config.js +5 -3
  4. package/cli/config.js +4 -3
  5. package/cli/diagnostics.js +54 -15
  6. package/cli/run.js +40 -11
  7. package/firewall-only.js +1 -1
  8. package/firewall.js +88 -57
  9. package/mcp/catalog.js +1 -1
  10. package/nextjs-webpack-config.js +3 -15
  11. package/nextjs.js +21 -23
  12. package/nuxt-server-plugin.mjs +20 -10
  13. package/package.json +33 -34
  14. package/register.js +1 -1
  15. package/tracing.js +17 -7
  16. package/web-vite.mjs +23 -13
  17. package/CONSUMING-APPS-GUIDE.md +0 -463
  18. package/docs/ALL-FRAMEWORKS-QUICKSTART.md +0 -1388
  19. package/docs/API-KEYS-GUIDE.md +0 -278
  20. package/docs/ARCHITECTURE.md +0 -408
  21. package/docs/AUTO-BODY-CAPTURE.md +0 -412
  22. package/docs/AUTO-SETUP-SUMMARY.md +0 -331
  23. package/docs/AUTO-SETUP.md +0 -419
  24. package/docs/AUTOMATIC-IP-CAPTURE.md +0 -359
  25. package/docs/BODY-CAPTURE-FIX.md +0 -261
  26. package/docs/BODY-CAPTURE-QUICKSTART.md +0 -147
  27. package/docs/CHANGELOG-NEXTJS.md +0 -235
  28. package/docs/COMPLETION-REPORT.md +0 -408
  29. package/docs/CUSTOMER-GUIDE.md +0 -364
  30. package/docs/EASIEST-SETUP.md +0 -342
  31. package/docs/ENVIRONMENT-VARIABLES.md +0 -166
  32. package/docs/ENVIRONMENTS.md +0 -60
  33. package/docs/EXPRESS-BODY-CAPTURE.md +0 -1028
  34. package/docs/EXPRESS-SETUP-GUIDE.md +0 -722
  35. package/docs/FINAL-SOLUTION.md +0 -335
  36. package/docs/FIREWALL-GUIDE.md +0 -440
  37. package/docs/IMPLEMENTATION-SUMMARY.md +0 -410
  38. package/docs/INDEX.md +0 -222
  39. package/docs/LOGGING-GUIDE.md +0 -704
  40. package/docs/LOGGING-QUICKSTART.md +0 -221
  41. package/docs/MCP-GUIDE.md +0 -58
  42. package/docs/NEXTJS-BODY-CAPTURE-COMPARISON.md +0 -323
  43. package/docs/NEXTJS-BODY-CAPTURE.md +0 -368
  44. package/docs/NEXTJS-GUIDE.md +0 -392
  45. package/docs/NEXTJS-QUICKSTART.md +0 -83
  46. package/docs/NEXTJS-SETUP-COMPLETE.md +0 -795
  47. package/docs/NEXTJS-WEBPACK-WARNINGS.md +0 -267
  48. package/docs/NEXTJS-WRAPPER-APPROACH.md +0 -414
  49. package/docs/NUXT-GUIDE.md +0 -173
  50. package/docs/QUICKSTART-BODY-CAPTURE.md +0 -293
  51. package/docs/REDACTION-EXAMPLES.md +0 -484
  52. package/docs/REQUEST-BODY-CAPTURE.md +0 -587
  53. package/docs/SOLUTION-SUMMARY.md +0 -312
  54. package/docs/VERCEL-OTEL-MIGRATION.md +0 -255
  55. package/examples/README.md +0 -265
  56. package/examples/express-with-logging.js +0 -137
  57. package/examples/instrumentation-with-auto-capture.ts +0 -41
  58. package/examples/next.config.js +0 -37
  59. package/examples/nextjs-api-route-with-body-capture.ts +0 -54
  60. package/examples/nextjs-env-example.txt +0 -32
  61. package/examples/nextjs-instrumentation.js +0 -36
  62. package/examples/nextjs-instrumentation.ts +0 -36
  63. package/examples/nextjs-middleware.js +0 -37
  64. package/examples/nextjs-middleware.ts +0 -37
  65. package/examples/nextjs-with-logging-example.md +0 -301
  66. package/examples/nextjs-with-options.ts +0 -36
  67. package/examples/test-nextjs-setup.js +0 -70
  68. package/postinstall.js +0 -296
@@ -1,704 +0,0 @@
1
- # SecureNow Logging Guide
2
-
3
- Complete guide for sending logs from your Node.js applications to SecureNow using the SecureNow library.
4
-
5
- **Since securenow v5.6.0:** When `SECURENOW_LOGGING_ENABLED=1` is set, all `console.log`, `console.warn`, `console.error`, `console.info`, and `console.debug` calls are automatically forwarded as OTLP log records. You only need `require('securenow/register')` — a separate `securenow/console-instrumentation` preload is no longer required.
6
-
7
- ## Table of Contents
8
-
9
- - [Quick Start](#quick-start)
10
- - [Configuration](#configuration)
11
- - [Usage Methods](#usage-methods)
12
- - [Method 1: Automatic Console Instrumentation](#method-1-automatic-console-instrumentation-easiest)
13
- - [Method 2: Direct Logger API](#method-2-direct-logger-api)
14
- - [Method 3: Custom Logger Integration](#method-3-custom-logger-integration)
15
- - [Framework-Specific Examples](#framework-specific-examples)
16
- - [Express.js](#expressjs)
17
- - [Next.js](#nextjs)
18
- - [Fastify](#fastify)
19
- - [NestJS](#nestjs)
20
- - [Advanced Configuration](#advanced-configuration)
21
- - [Troubleshooting](#troubleshooting)
22
-
23
- ---
24
-
25
- ## Quick Start
26
-
27
- ### 1. Install SecureNow
28
-
29
- ```bash
30
- npm install securenow
31
- ```
32
-
33
- ### 2. Enable Logging
34
-
35
- Set environment variables:
36
-
37
- ```bash
38
- # Required: Enable logging
39
- export SECURENOW_LOGGING_ENABLED=1
40
-
41
- # Required: Your app identifier
42
- export SECURENOW_APPID=my-app
43
-
44
- # Optional: Your OTLP endpoint (defaults to https://freetrial.securenow.ai:4318)
45
- export SECURENOW_INSTANCE=http://your-otlp-backend:4318
46
-
47
- # Optional: Authentication for hosted OTLP / SecureNow
48
- export OTEL_EXPORTER_OTLP_HEADERS="x-api-key=your-key-here"
49
- ```
50
-
51
- ### 3. Choose Your Usage Method
52
-
53
- **Option A: Automatic Console Logging (Easiest)**
54
-
55
- ```javascript
56
- // At the top of your main file (app.js, index.js, server.js)
57
- require('securenow/register');
58
-
59
- // With SECURENOW_LOGGING_ENABLED=1, all console logs are automatically sent to SecureNow
60
- console.log('Application started');
61
- console.error('An error occurred', { userId: 123 });
62
- console.warn('Warning message');
63
- ```
64
-
65
- **Option B: Direct Logger API**
66
-
67
- ```javascript
68
- require('securenow/register');
69
- const { getLogger } = require('securenow/tracing');
70
-
71
- const logger = getLogger('my-module', '1.0.0');
72
-
73
- logger.emit({
74
- severityNumber: 9, // INFO
75
- severityText: 'INFO',
76
- body: 'User logged in',
77
- attributes: {
78
- userId: 123,
79
- username: 'john',
80
- },
81
- });
82
- ```
83
-
84
- ---
85
-
86
- ## Configuration
87
-
88
- ### Environment Variables
89
-
90
- ```bash
91
- # Logging Control
92
- SECURENOW_LOGGING_ENABLED=1 # Enable logging (default: 1)
93
-
94
- # Connection Settings
95
- SECURENOW_INSTANCE=http://localhost:4318 # Base OTLP endpoint
96
- OTEL_EXPORTER_OTLP_ENDPOINT=... # Alternative to SECURENOW_INSTANCE
97
- OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=... # Specific logs endpoint (overrides base)
98
-
99
- # Authentication (for hosted OTLP / SecureNow)
100
- OTEL_EXPORTER_OTLP_HEADERS="x-api-key=YOUR_KEY"
101
-
102
- # Service Identification
103
- SECURENOW_APPID=my-app # Your application name
104
- OTEL_SERVICE_NAME=my-app # Alternative to SECURENOW_APPID
105
-
106
- # Additional Options
107
- OTEL_LOG_LEVEL=info # debug|info|warn|error
108
- NODE_ENV=production # Environment name
109
- ```
110
-
111
- ### Hosted OTLP / SecureNow configuration
112
-
113
- For SecureNow or another hosted OTLP endpoint:
114
-
115
- ```bash
116
- export SECURENOW_LOGGING_ENABLED=1
117
- export SECURENOW_APPID=my-app
118
- export SECURENOW_INSTANCE=https://freetrial.securenow.ai:4318
119
- export OTEL_EXPORTER_OTLP_HEADERS="x-api-key=<your-api-key>"
120
- ```
121
-
122
- Replace:
123
- - `SECURENOW_INSTANCE`: Use the OTLP base URL from your SecureNow dashboard (defaults to the freetrial endpoint above)
124
- - `<your-api-key>`: Your API key or other credentials as required by your backend
125
-
126
- ---
127
-
128
- ## Usage Methods
129
-
130
- ### Method 1: Automatic Console Instrumentation (Easiest)
131
-
132
- With `SECURENOW_LOGGING_ENABLED=1`, SecureNow wraps the default `console` methods to automatically send logs to SecureNow while still printing to the console.
133
-
134
- **Setup:**
135
-
136
- ```javascript
137
- // app.js or index.js
138
- require('securenow/register');
139
-
140
- const express = require('express');
141
- const app = express();
142
-
143
- // Use console as normal - all logs are captured
144
- console.log('Server starting...');
145
-
146
- app.get('/', (req, res) => {
147
- console.info('Request received', { path: req.path });
148
- res.send('Hello World');
149
- });
150
-
151
- app.listen(3000, () => {
152
- console.log('Server running on port 3000');
153
- });
154
- ```
155
-
156
- **Supported Methods:**
157
- - `console.log()` → INFO level
158
- - `console.info()` → INFO level
159
- - `console.warn()` → WARN level
160
- - `console.error()` → ERROR level
161
- - `console.debug()` → DEBUG level
162
-
163
- **Benefits:**
164
- - ✅ Zero code changes needed
165
- - ✅ Works with existing console logging
166
- - ✅ Automatic severity mapping
167
- - ✅ Works with all frameworks
168
-
169
- ---
170
-
171
- ### Method 2: Direct Logger API
172
-
173
- Use the OpenTelemetry logger API directly for more control.
174
-
175
- ```javascript
176
- require('securenow/register');
177
- const { getLogger } = require('securenow/tracing');
178
-
179
- // Get a logger instance
180
- const logger = getLogger('my-service', '1.0.0');
181
-
182
- // Emit structured logs
183
- logger.emit({
184
- severityNumber: 9, // OpenTelemetry severity number
185
- severityText: 'INFO', // Human-readable severity
186
- body: 'User login', // Log message
187
- attributes: { // Structured attributes
188
- userId: 123,
189
- username: 'john',
190
- ip: '192.168.1.1',
191
- },
192
- });
193
- ```
194
-
195
- **Severity Numbers:**
196
- - `5` - DEBUG
197
- - `9` - INFO
198
- - `13` - WARN
199
- - `17` - ERROR
200
-
201
- **Example with Error:**
202
-
203
- ```javascript
204
- try {
205
- // Some operation
206
- } catch (error) {
207
- logger.emit({
208
- severityNumber: 17,
209
- severityText: 'ERROR',
210
- body: 'Database connection failed',
211
- attributes: {
212
- error: error.message,
213
- stack: error.stack,
214
- database: 'postgres',
215
- },
216
- });
217
- }
218
- ```
219
-
220
- ---
221
-
222
- ### Method 3: Custom Logger Integration
223
-
224
- Create a wrapper for your preferred logging style.
225
-
226
- ```javascript
227
- // logger.js
228
- require('securenow/register');
229
- const { getLogger } = require('securenow/tracing');
230
-
231
- const logger = getLogger('app-logger', '1.0.0');
232
-
233
- const SeverityNumber = {
234
- DEBUG: 5,
235
- INFO: 9,
236
- WARN: 13,
237
- ERROR: 17,
238
- };
239
-
240
- function log(level, message, attributes = {}) {
241
- if (!logger) {
242
- console.log(message, attributes);
243
- return;
244
- }
245
-
246
- logger.emit({
247
- severityNumber: SeverityNumber[level],
248
- severityText: level,
249
- body: message,
250
- attributes,
251
- });
252
-
253
- // Also log to console
254
- console.log(`[${level}] ${message}`, attributes);
255
- }
256
-
257
- module.exports = {
258
- debug: (msg, attrs) => log('DEBUG', msg, attrs),
259
- info: (msg, attrs) => log('INFO', msg, attrs),
260
- warn: (msg, attrs) => log('WARN', msg, attrs),
261
- error: (msg, attrs) => log('ERROR', msg, attrs),
262
- };
263
- ```
264
-
265
- **Usage:**
266
-
267
- ```javascript
268
- const logger = require('./logger');
269
-
270
- logger.info('User signed up', { userId: 456, email: 'user@example.com' });
271
- logger.error('Payment failed', { orderId: 789, amount: 99.99 });
272
- ```
273
-
274
- ---
275
-
276
- ## Framework-Specific Examples
277
-
278
- ### Express.js
279
-
280
- ```javascript
281
- // app.js
282
- require('securenow/register');
283
-
284
- const express = require('express');
285
- const app = express();
286
-
287
- app.use(express.json());
288
-
289
- // Logging middleware
290
- app.use((req, res, next) => {
291
- console.info('Request received', {
292
- method: req.method,
293
- path: req.path,
294
- ip: req.ip,
295
- });
296
- next();
297
- });
298
-
299
- app.get('/', (req, res) => {
300
- console.log('Home page accessed');
301
- res.send('Hello World');
302
- });
303
-
304
- app.post('/api/users', (req, res) => {
305
- console.info('User created', { userData: req.body });
306
- res.json({ success: true });
307
- });
308
-
309
- // Error handler with logging
310
- app.use((err, req, res, next) => {
311
- console.error('Express error', {
312
- error: err.message,
313
- stack: err.stack,
314
- path: req.path,
315
- });
316
- res.status(500).json({ error: 'Internal server error' });
317
- });
318
-
319
- app.listen(3000, () => {
320
- console.log('Express server running on port 3000');
321
- });
322
- ```
323
-
324
- **Run with:**
325
-
326
- ```bash
327
- SECURENOW_LOGGING_ENABLED=1 \
328
- SECURENOW_APPID=express-app \
329
- NODE_OPTIONS="-r securenow/register" \
330
- node app.js
331
- ```
332
-
333
- ---
334
-
335
- ### Next.js
336
-
337
- #### App Router (Next.js 13+)
338
-
339
- **instrumentation.ts:**
340
-
341
- ```typescript
342
- // instrumentation.ts (in root directory)
343
- export async function register() {
344
- if (process.env.NEXT_RUNTIME === 'nodejs') {
345
- // Enable tracing and logging
346
- process.env.SECURENOW_LOGGING_ENABLED = '1';
347
-
348
- await import('securenow/register');
349
- }
350
- }
351
- ```
352
-
353
- **Environment Variables (.env.local):**
354
-
355
- ```bash
356
- SECURENOW_LOGGING_ENABLED=1
357
- SECURENOW_APPID=nextjs-app
358
- SECURENOW_INSTANCE=http://your-otlp-backend:4318
359
- ```
360
-
361
- **Usage in API Routes:**
362
-
363
- ```typescript
364
- // app/api/users/route.ts
365
- import { NextRequest, NextResponse } from 'next/server';
366
-
367
- export async function GET(request: NextRequest) {
368
- console.log('GET /api/users called');
369
-
370
- const users = await fetchUsers();
371
- console.info('Users fetched', { count: users.length });
372
-
373
- return NextResponse.json(users);
374
- }
375
-
376
- export async function POST(request: NextRequest) {
377
- const data = await request.json();
378
- console.info('Creating user', { email: data.email });
379
-
380
- try {
381
- const user = await createUser(data);
382
- console.log('User created successfully', { userId: user.id });
383
- return NextResponse.json(user);
384
- } catch (error) {
385
- console.error('Failed to create user', { error: error.message });
386
- return NextResponse.json({ error: 'Failed' }, { status: 500 });
387
- }
388
- }
389
- ```
390
-
391
- **Usage in Server Components:**
392
-
393
- ```typescript
394
- // app/dashboard/page.tsx
395
- export default async function DashboardPage() {
396
- console.log('Dashboard page rendering');
397
-
398
- const data = await fetchDashboardData();
399
- console.info('Dashboard data loaded', { items: data.length });
400
-
401
- return <div>{/* your component */}</div>;
402
- }
403
- ```
404
-
405
- ---
406
-
407
- ### Fastify
408
-
409
- ```javascript
410
- // server.js
411
- require('securenow/register');
412
-
413
- const fastify = require('fastify')({ logger: false });
414
-
415
- // Logging hook
416
- fastify.addHook('onRequest', async (request, reply) => {
417
- console.info('Request received', {
418
- method: request.method,
419
- url: request.url,
420
- });
421
- });
422
-
423
- fastify.get('/', async (request, reply) => {
424
- console.log('Root endpoint called');
425
- return { hello: 'world' };
426
- });
427
-
428
- fastify.post('/users', async (request, reply) => {
429
- console.info('Creating user', { body: request.body });
430
- return { success: true };
431
- });
432
-
433
- // Error handler
434
- fastify.setErrorHandler((error, request, reply) => {
435
- console.error('Fastify error', {
436
- error: error.message,
437
- stack: error.stack,
438
- url: request.url,
439
- });
440
- reply.status(500).send({ error: 'Internal server error' });
441
- });
442
-
443
- const start = async () => {
444
- try {
445
- await fastify.listen({ port: 3000 });
446
- console.log('Fastify server running on port 3000');
447
- } catch (err) {
448
- console.error('Server start failed', { error: err });
449
- process.exit(1);
450
- }
451
- };
452
-
453
- start();
454
- ```
455
-
456
- ---
457
-
458
- ### NestJS
459
-
460
- **main.ts:**
461
-
462
- ```typescript
463
- // main.ts
464
- require('securenow/register');
465
-
466
- import { NestFactory } from '@nestjs/core';
467
- import { AppModule } from './app.module';
468
-
469
- async function bootstrap() {
470
- const app = await NestFactory.create(AppModule);
471
-
472
- console.log('NestJS application starting...');
473
-
474
- await app.listen(3000);
475
- console.log('NestJS application running on port 3000');
476
- }
477
-
478
- bootstrap();
479
- ```
480
-
481
- **Service with logging:**
482
-
483
- ```typescript
484
- // users.service.ts
485
- import { Injectable } from '@nestjs/common';
486
-
487
- @Injectable()
488
- export class UsersService {
489
- async findAll() {
490
- console.log('Fetching all users');
491
- const users = await this.fetchFromDatabase();
492
- console.info('Users retrieved', { count: users.length });
493
- return users;
494
- }
495
-
496
- async create(userData: any) {
497
- console.info('Creating user', { email: userData.email });
498
-
499
- try {
500
- const user = await this.saveToDatabase(userData);
501
- console.log('User created', { userId: user.id });
502
- return user;
503
- } catch (error) {
504
- console.error('Failed to create user', {
505
- error: error.message,
506
- email: userData.email,
507
- });
508
- throw error;
509
- }
510
- }
511
- }
512
- ```
513
-
514
- **Run with environment variables:**
515
-
516
- ```bash
517
- SECURENOW_LOGGING_ENABLED=1 \
518
- SECURENOW_APPID=nestjs-app \
519
- npm run start
520
- ```
521
-
522
- ---
523
-
524
- ## Advanced Configuration
525
-
526
- ### Disable Logging Temporarily
527
-
528
- ```bash
529
- SECURENOW_LOGGING_ENABLED=0 node app.js
530
- ```
531
-
532
- ### Custom Logs Endpoint
533
-
534
- ```bash
535
- export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=http://custom-collector:4318/v1/logs
536
- ```
537
-
538
- ### Check if Logging is Enabled
539
-
540
- ```javascript
541
- const { isLoggingEnabled } = require('securenow/tracing');
542
-
543
- if (isLoggingEnabled()) {
544
- console.log('Logging is enabled');
545
- }
546
- ```
547
-
548
- ### Multiple Logger Instances
549
-
550
- ```javascript
551
- const { getLogger } = require('securenow/tracing');
552
-
553
- const authLogger = getLogger('auth-service', '1.0.0');
554
- const dbLogger = getLogger('database', '2.0.0');
555
- const apiLogger = getLogger('api', '1.0.0');
556
-
557
- authLogger.emit({
558
- severityNumber: 9,
559
- severityText: 'INFO',
560
- body: 'User logged in',
561
- attributes: { userId: 123 },
562
- });
563
-
564
- dbLogger.emit({
565
- severityNumber: 13,
566
- severityText: 'WARN',
567
- body: 'Slow query detected',
568
- attributes: { queryTime: 5000, query: 'SELECT ...' },
569
- });
570
- ```
571
-
572
- ---
573
-
574
- ## Troubleshooting
575
-
576
- ### Logs not appearing in SecureNow
577
-
578
- **Check 1: Is logging enabled?**
579
-
580
- ```bash
581
- SECURENOW_LOGGING_ENABLED=1
582
- ```
583
-
584
- **Check 2: Verify endpoint**
585
-
586
- ```bash
587
- # For self-hosted OTLP collector
588
- export SECURENOW_INSTANCE=http://your-otlp-backend:4318
589
-
590
- # For SecureNow / hosted OTLP
591
- export SECURENOW_INSTANCE=https://freetrial.securenow.ai:4318
592
- export OTEL_EXPORTER_OTLP_HEADERS="x-api-key=<your-key>"
593
- ```
594
-
595
- **Check 3: Enable debug logging**
596
-
597
- ```bash
598
- export OTEL_LOG_LEVEL=debug
599
- node app.js
600
- ```
601
-
602
- Look for messages like:
603
- ```
604
- [securenow] 📋 Logging: ENABLED → http://localhost:4318/v1/logs
605
- ```
606
-
607
- **Check 4: Verify initialization order**
608
-
609
- Make sure `securenow/register` is required BEFORE any other code:
610
-
611
- ```javascript
612
- // ✅ Correct
613
- require('securenow/register');
614
- const express = require('express');
615
-
616
- // ❌ Wrong
617
- const express = require('express');
618
- require('securenow/register');
619
- ```
620
-
621
- ### Console logs not forwarded
622
-
623
- **Check load order:** `require('securenow/register')` must run before your app code so console forwarding can be installed.
624
-
625
- ```javascript
626
- require('securenow/register');
627
- // ... rest of your app
628
- ```
629
-
630
- **Verify in output:**
631
-
632
- You should see messages indicating logging is enabled, for example:
633
- ```
634
- [securenow] 📋 Logging: ENABLED → http://localhost:4318/v1/logs
635
- ```
636
-
637
- ### Logger returns null
638
-
639
- This happens when logging is not enabled:
640
-
641
- ```javascript
642
- const { getLogger } = require('securenow/tracing');
643
- const logger = getLogger('test');
644
-
645
- if (!logger) {
646
- console.log('Logging not enabled - set SECURENOW_LOGGING_ENABLED=1');
647
- }
648
- ```
649
-
650
- ### Logs in SecureNow but missing attributes
651
-
652
- Make sure you're passing attributes correctly:
653
-
654
- ```javascript
655
- // ✅ Correct
656
- console.log('User action', { userId: 123, action: 'login' });
657
-
658
- // ❌ Won't capture structured data
659
- console.log('User action userId=123 action=login');
660
- ```
661
-
662
- Or use direct logger API:
663
-
664
- ```javascript
665
- logger.emit({
666
- severityNumber: 9,
667
- severityText: 'INFO',
668
- body: 'User action',
669
- attributes: {
670
- userId: 123,
671
- action: 'login',
672
- },
673
- });
674
- ```
675
-
676
- ---
677
-
678
- ## Best Practices
679
-
680
- 1. **Always enable logging via environment variable** - don't hardcode it
681
- 2. **Use structured logging** - pass objects with meaningful attributes
682
- 3. **Include context** - userId, requestId, etc. in log attributes
683
- 4. **Use appropriate severity levels** - INFO for normal flow, ERROR for exceptions
684
- 5. **Don't log sensitive data** - passwords, tokens, credit cards
685
- 6. **Use different loggers for different modules** - easier filtering in SecureNow
686
-
687
- ---
688
-
689
- ## Next Steps
690
-
691
- - [SecureNow](https://securenow.ai/)
692
- - [Documentation](./INDEX.md)
693
- - [Combine with tracing](../README.md) for full observability
694
-
695
- ---
696
-
697
- ## Support
698
-
699
- - **Issues**: [GitHub Issues](https://github.com/your-repo/securenow-npm)
700
- - **Documentation**: [Full Docs](./INDEX.md)
701
- - **Website**: [securenow.ai](http://securenow.ai/)
702
- # Current setup note
703
-
704
- Use `.securenow/credentials.json` for local and production. Run `npx securenow login`, `npx securenow init`, and for production generate `npx securenow credentials runtime --env production`; mount/copy that file as `.securenow/credentials.json`. Env-var examples in this older guide are legacy fallback snippets.