Skip to content

Commit 9d004a4

Browse files
committed
fix: output structured logs for New Relic log forwarding
1 parent 52023ad commit 9d004a4

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# [1.7.0](https://github.com/typelets/typelets-api/compare/v1.6.2...v1.7.0) (2025-10-15)
22

3-
43
### Features
54

6-
* add optimized notes counts endpoint for mobile app ([225691d](https://github.com/typelets/typelets-api/commit/225691d305a99251f3eeeafbd794a1e392ee2210))
5+
- add optimized notes counts endpoint for mobile app ([225691d](https://github.com/typelets/typelets-api/commit/225691d305a99251f3eeeafbd794a1e392ee2210))
76

87
## [1.6.2](https://github.com/typelets/typelets-api/compare/v1.6.1...v1.6.2) (2025-10-15)
98

src/lib/logger.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ class Logger {
3838
return level.priority <= this.currentLogLevel.priority;
3939
}
4040

41-
private formatLog(level: string, message: string, meta: LogMetadata = {}): string {
42-
const logEntry = {
41+
private formatLog(
42+
level: string,
43+
message: string,
44+
meta: LogMetadata = {}
45+
): Record<string, unknown> {
46+
return {
4347
timestamp: new Date().toISOString(),
4448
level,
4549
service: this.service,
@@ -48,8 +52,6 @@ class Logger {
4852
message,
4953
...meta,
5054
};
51-
52-
return JSON.stringify(logEntry);
5355
}
5456

5557
error(message: string, meta: LogMetadata = {}, error?: Error): void {

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// This file is automatically updated by semantic-release
2-
export const VERSION = "1.7.0"
2+
export const VERSION = "1.7.0";

0 commit comments

Comments
 (0)