-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: pipe debug logs to stdout, add separate util to pipe to stderr (…
- Loading branch information
Showing
15 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
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,12 @@ | ||
--- | ||
"@latticexyz/abi-ts": patch | ||
"@latticexyz/block-logs-stream": patch | ||
"@latticexyz/cli": patch | ||
"@latticexyz/common": patch | ||
"@latticexyz/faucet": patch | ||
"@latticexyz/store-indexer": patch | ||
"@latticexyz/store-sync": patch | ||
"@latticexyz/store": patch | ||
--- | ||
|
||
Updated the `debug` util to pipe to `stdout` and added an additional util to explicitly pipe to `stderr` when needed. |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import createDebug from "debug"; | ||
|
||
export const debug = createDebug("abi-ts"); | ||
export const error = createDebug("abi-ts"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import createDebug from "debug"; | ||
|
||
export const debug = createDebug("mud:block-events-stream"); | ||
export const error = createDebug("mud:block-events-stream"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import createDebug from "debug"; | ||
|
||
export const debug = createDebug("mud:cli"); | ||
export const error = createDebug("mud:cli"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { debug as parentDebug } from "../debug"; | ||
|
||
export const debug = parentDebug.extend("deploy"); | ||
export const error = parentDebug.extend("deploy"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { debug as parentDebug } from "../debug"; | ||
|
||
export const debug = parentDebug.extend("codegen"); | ||
export const error = parentDebug.extend("codegen"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import createDebug from "debug"; | ||
|
||
export const debug = createDebug("mud:common"); | ||
export const error = createDebug("mud:common"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import createDebug from "debug"; | ||
|
||
export const debug = createDebug("mud:faucet"); | ||
export const error = createDebug("mud:faucet"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import createDebug from "debug"; | ||
|
||
export const debug = createDebug("mud:store-indexer"); | ||
export const error = createDebug("mud:store-indexer"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import createDebug from "debug"; | ||
|
||
export const debug = createDebug("mud:store-sync"); | ||
export const error = createDebug("mud:store-sync"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { debug as parentDebug } from "../debug"; | ||
|
||
export const debug = parentDebug.extend("postgres-decoded"); | ||
export const error = parentDebug.extend("postgres-decoded"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { debug as parentDebug } from "../debug"; | ||
|
||
export const debug = parentDebug.extend("postgres"); | ||
export const error = parentDebug.extend("postgres"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { debug as parentDebug } from "../debug"; | ||
|
||
export const debug = parentDebug.extend("recs"); | ||
export const error = parentDebug.extend("reccs"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { debug as parentDebug } from "../debug"; | ||
|
||
export const debug = parentDebug.extend("sqlite"); | ||
export const error = parentDebug.extend("sqlite"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { debug as parentDebug } from "../debug"; | ||
|
||
export const debug = parentDebug.extend("zustand"); | ||
export const error = parentDebug.extend("zustand"); | ||
|
||
// Pipe debug output to stdout instead of stderr | ||
debug.log = console.debug.bind(console); | ||
|
||
// Pipe error output to stderr | ||
error.log = console.error.bind(console); |