Add some logging related stubs to express backend
This commit is contained in:
@@ -6,6 +6,10 @@ const { values } = parseArgs({
|
||||
type: "string",
|
||||
short: "l",
|
||||
},
|
||||
"log-address": {
|
||||
type: "string",
|
||||
default: "8085",
|
||||
},
|
||||
},
|
||||
strict: true,
|
||||
allowPositionals: false,
|
||||
@@ -43,7 +47,9 @@ function parseListenAddress(listen: string | undefined): {
|
||||
}
|
||||
|
||||
const listenAddress = parseListenAddress(values.listen);
|
||||
const logAddress = parseListenAddress(values["log-address"]);
|
||||
|
||||
export const cli = {
|
||||
listen: listenAddress,
|
||||
logAddress,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// internal-logging.ts
|
||||
|
||||
import { cli } from "./cli";
|
||||
|
||||
// FIXME: Move this to somewhere more appropriate
|
||||
type AtLeastOne<T> = [T, ...T[]];
|
||||
|
||||
@@ -32,6 +34,9 @@ type FilterArgument = {
|
||||
|
||||
const log = (_message: Message) => {
|
||||
// WRITEME
|
||||
console.log(
|
||||
`will POST a message to ${cli.logAddress.host}:${cli.logAddress.port}`,
|
||||
);
|
||||
};
|
||||
|
||||
const getLogs = (filter: FilterArgument) => {
|
||||
|
||||
Reference in New Issue
Block a user