mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
allow objects for hapi's request.log (#9353)
This commit is contained in:
parent
ac94ea7331
commit
ccb4c316dc
@ -79,6 +79,7 @@ server.route({
|
||||
method: 'GET',
|
||||
path: '/hello',
|
||||
handler: function (request: Hapi.Request, reply: Function) {
|
||||
request.log('info', { route: '/hello' }, Date.now());
|
||||
reply('hello world');
|
||||
}
|
||||
});
|
||||
|
||||
2
hapi/hapi.d.ts
vendored
2
hapi/hapi.d.ts
vendored
@ -1301,7 +1301,7 @@ declare module "hapi" {
|
||||
log(/** a string or an array of strings (e.g. ['error', 'database', 'read']) used to identify the event. Tags are used instead of log levels and provide a much more expressive mechanism for describing and filtering events.*/
|
||||
tags: string | string[],
|
||||
/** an optional message string or object with the application data being logged.*/
|
||||
data?: string,
|
||||
data?: any,
|
||||
/** an optional timestamp expressed in milliseconds. Defaults to Date.now() (now).*/
|
||||
timestamp?: number): void;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user