https://github.com/ryanfarber/logger
A simple logging utility with a save function.
https://github.com/ryanfarber/logger
logger logging
Last synced: 29 days ago
JSON representation
A simple logging utility with a save function.
- Host: GitHub
- URL: https://github.com/ryanfarber/logger
- Owner: ryanfarber
- Created: 2020-07-05T10:46:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-02T01:38:24.000Z (about 2 years ago)
- Last Synced: 2026-04-25T17:14:11.945Z (2 months ago)
- Topics: logger, logging
- Language: JavaScript
- Homepage: https://github.com/ryanfarber/rf-logger
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# logger
A simple logging utility
### usage
```javascript
const Logger = require("@ryanforever/logger")
const logger = new Logger(__filename, {debug: true,})
logger.log("hello world")
logger.info("hello info")
logger.warn("hello warning")
logger.error("hello error")
logger.debug("hello debug")
logger.inspect({this: {is: {a: {deeply: {nested: "object"}}}}})
```
### use papertrail
you can add logs to [Papertrail](https://papertrailapp.com)
```javascript
const Logger = require("@ryanforever/logger")
const logger = new Logger(__filename, {
usePapertrail: true,
papertrailKey: process.env.PAPERTRAIL_KEY
})
```