-
-
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.
- Loading branch information
Showing
5 changed files
with
77 additions
and
1 deletion.
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,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="favicon.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>log vanilla</title> | ||
</head> | ||
<body> | ||
<div id="app"> | ||
<h1>Please open your Console panel</h1> | ||
|
||
<p>mac os: ⌘ + ⌥ + J</p> | ||
<p>windows: ctrl + shift + j</p> | ||
<p>linux: ctrl + shift + j</p> | ||
</div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import log from '@elonehoo/log' | ||
|
||
// levels: 1 - fatal, 2 - info, 3 - error, 4 - warn, 5 - debug, 6 - trace (default is 2) | ||
log.setLevel(6); // the larger the number, the higher the verbosity | ||
|
||
// simple logging | ||
log.trace("trace message"); | ||
log.debug("debug message"); | ||
log.info("info message"); | ||
log.error("error message"); | ||
log.warn("warn message"); | ||
log.fatal("fatal message"); | ||
|
||
// passing params | ||
log.debug("debug message with array:", [1, 2, 3, 4], {a: 1, b: 2}); | ||
log.debug("debug message with object:", {a: 1, b: 2}); | ||
log.debug("debug message with number:", Math.random()); | ||
|
||
// using scopes | ||
const scopedLog = log.scope("scope"); | ||
scopedLog.debug("debug message"); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.