Skip to content

Commit

Permalink
setLogLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
Morglod committed Apr 10, 2024
1 parent ea08eb8 commit 43d0358
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bun-ffi-gen",
"version": "1.1.1",
"version": "1.1.2",
"module": "lib/index.ts",
"description": "FFI bindings generator for Bun",
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export enum LogLevel {

export let logLevel = LogLevel.info;

export function setLogLevel(lvl: LogLevel) {
logLevel = lvl;
}

export function logVerbose(...args: any[]) {
if (logLevel === LogLevel.verbose) console.log("[verbose]", ...args);
}
Expand Down

0 comments on commit 43d0358

Please sign in to comment.