https://github.com/dinoscapeprogramming/log4j
A simple log package for JavaScript
https://github.com/dinoscapeprogramming/log4j
Last synced: about 1 year ago
JSON representation
A simple log package for JavaScript
- Host: GitHub
- URL: https://github.com/dinoscapeprogramming/log4j
- Owner: DinoscapeProgramming
- License: apache-2.0
- Created: 2022-02-24T12:30:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-24T16:02:33.000Z (over 4 years ago)
- Last Synced: 2025-02-12T17:28:35.253Z (over 1 year ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Log for JavaScript (log4j)
A simple log package for JavaScript
## Documentation
### Require the package
```js
const log = require('./log4j.js')
```
### Logging a simple message
```js
log("Hey Guys!")
```
#### Result
```
Hey Guys
```
### Using elements
```js
log("Hey {}! What's up {}", ["Guys", "lol"])
```
#### Result
```
Hey Guys! What's up lol
```
## Example
```js
const log = require('./log4j.js');
const settings = {
first: "test",
second: "package",
third: "nice"
};
log("Hey {}, what's {}? Welcome to {}. Have {}!", ["guys", "up", "log4j", "fun"])
log("Hey, this is a {}. This {} is {}!", [settings.first, settings.second, settings.third])
```
## Note
THIS PACKAGE IS DEPRECATED! PLEASE USE THIS:
```js
const settings = {
first: "Guys",
second: "lol"
}
console.log(`Hey ${settings.first}! What's up ${settings.second}`)
```