-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Queue incoming events. Add log package.
- Loading branch information
Showing
6 changed files
with
89 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,8 @@ export * as nostrToolsRelay from "npm:nostr-tools/relay"; | |
export * as nostrTools from "npm:nostr-tools"; | ||
export * as cliffy from "https://deno.land/x/[email protected]/mod.ts"; | ||
export * as nostrify from "jsr:@nostrify/nostrify@^0.30.0"; | ||
export * as queue from "jsr:@henrygd/[email protected]"; | ||
import { newQueue as newQueueImport } from "jsr:@henrygd/[email protected]"; | ||
export const newQueue = newQueueImport; | ||
// import * as logImport from "jsr:@std/[email protected]"; | ||
// export const log = logImport.getLogger("nostroots-server"); | ||
export * as logPackage from "jsr:@std/[email protected]"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { logPackage } from "./deps.ts"; | ||
|
||
logPackage.setup({ | ||
handlers: { | ||
console: new logPackage.ConsoleHandler("DEBUG", { | ||
formatter: (record) => | ||
`${record.datetime.toISOString()} [${record.levelName}] ${ | ||
record.msg | ||
} ${JSON.stringify(record.args)}`, | ||
useColors: true, | ||
}), | ||
}, | ||
loggers: { | ||
default: { | ||
level: "DEBUG", | ||
handlers: ["console"], | ||
}, | ||
}, | ||
}); | ||
|
||
export const log = logPackage.getLogger(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters