Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Nov 8, 2024
1 parent 0822fb5 commit 7278daf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ declare module 'werelogs' {
warn(msg: string, data?: LogDictionary): void;
error(msg: string, data?: LogDictionary): void;
fatal(msg: string, data?: LogDictionary): void;
end(msg?: string, data?: LogDictionary): EndLogger;
end(): EndLogger;
end(msg: string, data?: LogDictionary): void;
errorEnd(msg: string, data?:LogDictionary): void;
}
Expand Down
18 changes: 9 additions & 9 deletions lib/RequestLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,15 @@ class RequestLogger {
return this.log('fatal', msg, data);
}

/**
* Logging function to write the last log entry for the given RequestLogger
*
* @returns {EndLogger} The EndLogger instance to continue logging.
*/
end() {
return this.endLogger;
}

/**
* @version 1.1
* @method RequestLogger#end
Expand Down Expand Up @@ -362,15 +371,6 @@ class RequestLogger {
return this.log(this.endLevel, msg, data, true);
}

/**
* Logging function to write the last log entry for the given RequestLogger
*
* @returns {EndLogger} The EndLogger instance to continue logging.
*/
end() {
return this.endLogger;
}

/**
* @deprecated since version 1.1
*
Expand Down

0 comments on commit 7278daf

Please sign in to comment.