|
1 | | -import * as log from "@std/log"; |
2 | | - |
3 | 1 | export function parseBool(s: string): boolean { |
4 | 2 | return ["1", "true", "on", "y", "yes"].includes(s.toLowerCase()); |
5 | 3 | } |
@@ -40,17 +38,17 @@ export function requestLog(headers: Record<string, string>) { |
40 | 38 | // ugh |
41 | 39 | // is there a better way to do this? certainly. |
42 | 40 | // does this work? also yes. |
43 | | - const proxyLog: (func: (s: any) => string) => (msg: any) => string = (func) => { |
| 41 | + const proxyLog: (func: (s: any) => void) => (msg: any) => void = (func) => { |
44 | 42 | // FIXME: `String()` mangles objects |
45 | 43 | return (msg) => func(prefix + String(msg)); |
46 | 44 | }; |
47 | 45 |
|
48 | 46 | return { |
49 | | - debug: proxyLog(log.debug), |
50 | | - info: proxyLog(log.info), |
51 | | - warn: proxyLog(log.warn), |
52 | | - error: proxyLog(log.error), |
53 | | - critical: proxyLog(log.critical), |
| 47 | + debug: proxyLog(console.debug), |
| 48 | + info: proxyLog(console.info), |
| 49 | + log: proxyLog(console.log), |
| 50 | + warn: proxyLog(console.warn), |
| 51 | + error: proxyLog(console.error), |
54 | 52 | }; |
55 | 53 | } |
56 | 54 |
|
|
0 commit comments