Skip to content

Commit

Permalink
change flag name to nimibQuiet
Browse files Browse the repository at this point in the history
  • Loading branch information
neroist committed Jun 18, 2024
1 parent d50d6fa commit ec23691
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ tracks further options in `nb.options.other: seq[tuple[kind: CmdLineKind; name,

nimib's behavior can be further turned via Nim's define flags:

* `-d:nimibNoLog`: Completely disables nimib's logging to stdout
* `-d:nimibQuiet`: Completely disables nimib's logging to stdout
* `-d:nimibCodeFromAst`: Makes nimib capture block code from AST of body (as opposed to from file source; see next section). Available since version 0.3

### Code capture
Expand Down
2 changes: 1 addition & 1 deletion docsrc/index.nim
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ tracks further options in `nb.options.other: seq[tuple[kind: CmdLineKind; name,
nimib's behavior can be further turned via Nim's define flags:
* `-d:nimibNoLog`: Completely disables nimib's logging to stdout
* `-d:nimibQuiet`: Completely disables nimib's logging to stdout
* `-d:nimibCodeFromAst`: Makes nimib capture block code from AST of body (as opposed to from file source; see next section). Available since version 0.3
### Code capture
Expand Down
2 changes: 1 addition & 1 deletion src/nimib/capture.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ template captureStdout*(ident: untyped, body: untyped) =
let (tmpFile, _) = createTempFile("tmp", "")
let tmpFileFd: FileHandle = tmpFile.getFileHandle()

# needs to be present when stdout isn't being written to by `newNbBlock` (-d:nimibNoLog)
# needs to be present when stdout isn't being written to by `newNbBlock` (-d:nimibQuiet)
stdout.flushFile()

# writing to stdoutFileno now writes to tmpFile
Expand Down
2 changes: 1 addition & 1 deletion src/nimib/logging.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import std/strformat

const nimibLog* = not defined(nimibNoLog)
const nimibLog* = not defined(nimibQuiet)

proc log*(label: string, message: string) =
when nimibLog:
Expand Down

0 comments on commit ec23691

Please sign in to comment.