-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.prettierrc: set printWidth to 120 (#103)
- Loading branch information
Showing
21 changed files
with
63 additions
and
264 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"printWidth": 120, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": true, | ||
|
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 |
---|---|---|
|
@@ -19,29 +19,22 @@ const logger = new Logtail(process.argv[2], { sendLogsToConsoleOutput: true }); | |
// Usage | ||
|
||
// Send debug level log using the debug() method | ||
const debugLog = logger.debug( | ||
`I am using Better Stack! (${process.title} v${ | ||
process.versions?.[process.title] | ||
})`, | ||
); | ||
const debugLog = logger.debug(`I am using Better Stack! (${process.title} v${process.versions?.[process.title]})`); | ||
|
||
// Send info level log using the info() method | ||
const infoLog = logger.info("An interesting event occurred!"); | ||
|
||
// Send warn level log using the warn() method | ||
// You can add additional structured data to help you troubleshoot your code as shown below | ||
const warningLog = logger.warn( | ||
"Something is not quite right, better check on it.", | ||
{ | ||
user: { | ||
username: "someuser", | ||
email: "[email protected]", | ||
}, | ||
additional_info: { | ||
tried_accessing: "/url/of/error", | ||
}, | ||
const warningLog = logger.warn("Something is not quite right, better check on it.", { | ||
user: { | ||
username: "someuser", | ||
email: "[email protected]", | ||
}, | ||
); | ||
additional_info: { | ||
tried_accessing: "/url/of/error", | ||
}, | ||
}); | ||
|
||
// Example of logging errors in catch clause | ||
function callbackThatMightFail() { | ||
|
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
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
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
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
Oops, something went wrong.