How to use the auditLogger function from restify
Find comprehensive JavaScript restify.auditLogger code examples handpicked from public code repositorys.
208 209 210 211 212 213 214 215 216 217
var _t = Math.floor((1000000 * t[0]) + (t[1] / 1000)); timers[time.name] = _t; }); restify.auditLogger({ log: req.log.child({ route: route }, true), body: body, timers: timers })(req, res, route, err);
71
449
0
98 99 100 101 102 103 104 105 106 107 108 109 110
/** * Request / Response Logging */ server.on('after', restify.auditLogger({ log: Logger })); /**
25
70
0
129 130 131 132 133 134 135 136 137 138
null, mod_path.join(filespath, 'index.htm'))); klServer.get('/resources/.*', dirServer.bind(null, '/resources/', mod_path.join(filespath, 'resources'))); klServer.post('/kart/video', auth, upload); klServer.on('after', mod_restify.auditLogger({ 'log': klLog })); klServer.listen(klPort, function () { klLog.info('%s server listening at %s', klServer.name, klServer.url);
8
77
12
+ 3 other calls in file
28 29 30 31 32 33 34 35 36
self.server = restify.createServer({ name: app_name, log: logger }); self.server.on('after', restify.auditLogger({ name: 'audit', log: logger }));
14
52
7
+ 3 other calls in file
117 118 119 120 121 122 123 124 125 126
req.ufds = self.ufds_client; next(); } }); server.on('after', restify.auditLogger({log: log})); // Show server.get('/customers', customers.operators, customers.list); server.head('/customers', customers.operators, customers.list);
8
6
0
GitHub: TritonDataCenter/sdc-papi
143 144 145 146 147 148 149 150 151 152
var auditLogger = new Logger({ name: 'audit', streams: [ { level: 'info', stream: process.stdout } ] }); server.on('after', restify.auditLogger({ log: auditLogger })); } /* * Set handers for routes.
6
2
34
184 185 186 187 188 189 190 191 192 193
var init_restify = function (_, next) { server.use(mod_restify.acceptParser(server.acceptable)); server.use(mod_restify.queryParser()); server.use(mod_restify.bodyParser({ 'mapParams': false })); server.on('after', mod_restify.auditLogger({ log: log.child({ component: 'AuditLog' }) })); server.on('uncaughtException', mod_common.restifyPanic);
5
2
43
+ 3 other calls in file
280 281 282 283 284 285 286 287 288 289
pkg_server.get(RegExp('^' + pkg_prefix + '/.+'), staticfunc); /* * Enable logging. */ pkg_server.on('after', mod_restify.auditLogger({ log: mod_bunyan.createLogger({ name: 'audit', stream: process.stdout })
0
0
0
+ 2 other calls in file
GitHub: RizenPanelV1/Blaze
65 66 67 68 69 70 71 72 73 74 75 76
req.headers['X-Access-Token'] = req.headers['x-access-token']; // eslint-disable-line } return next(); }); RestServer.on('after', Restify.auditLogger({ log: RestLogger, })); // Export this for Socket.io to make use of.
0
0
0
+ 4 other calls in file
GitHub: ptotem/UAB-BitNudge
35 36 37 38 39 40 41 42 43 44
// properties: { // foo: 'bar' // }, // serializers:bunyan.stdSerializers // })); // server.on('after', restify.auditLogger({ // log: bunyan.createLogger({ // name: 'auditLogger', // stream: process.stdout // })
0
0
8
restify.createServer is the most popular function in restify (1059 examples)