1645029000
pino
Very low overhead Node.js logger.
$ npm install pino
If you would like to install pino v6, refer to https://github.com/pinojs/pino/tree/v6.x.
const logger = require('pino')()
logger.info('hello world')
const child = logger.child({ a: 'property' })
child.info('hello child!')
This produces:
{"level":30,"time":1531171074631,"msg":"hello world","pid":657,"hostname":"Davids-MBP-3.fritz.box"}
{"level":30,"time":1531171082399,"msg":"hello child!","pid":657,"hostname":"Davids-MBP-3.fritz.box","a":"property"}
For using Pino with a web framework see:
http
The pino-pretty
module can be used to format logs during development:
Due to Node's single-threaded event-loop, it's highly recommended that sending, alert triggering, reformatting and all forms of log processing be conducted in a separate process or thread.
In Pino terminology we call all log processors "transports", and recommend that the transports be run in a worker thread using our pino.transport
API.
For more details see our Transports⇗ document.
Using minimum resources for logging is very important. Log messages tend to get added over time and this can lead to a throttling effect on applications – such as reduced requests per second.
In many cases, Pino is over 5x faster than alternatives.
See the Benchmarks document for comparisons.
Pino supports to being bundled using tools like webpack or esbuild.
See Bundling document for more informations.
https://www.npmjs.com/~matteo.collina
https://twitter.com/matteocollina
https://github.com/davidmarkclements
https://www.npmjs.com/~davidmarkclements
https://twitter.com/davidmarkclem
https://www.npmjs.com/~jsumners
https://twitter.com/jsumners79
Pino is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the CONTRIBUTING.md file for more details.
This project was kindly sponsored by nearForm.
Logo and identity designed by Cosmic Fox Design: https://www.behance.net/cosmicfox.
Author: Pinojs
Source Code: https://github.com/pinojs/pino
License: View license
1645029000
pino
Very low overhead Node.js logger.
$ npm install pino
If you would like to install pino v6, refer to https://github.com/pinojs/pino/tree/v6.x.
const logger = require('pino')()
logger.info('hello world')
const child = logger.child({ a: 'property' })
child.info('hello child!')
This produces:
{"level":30,"time":1531171074631,"msg":"hello world","pid":657,"hostname":"Davids-MBP-3.fritz.box"}
{"level":30,"time":1531171082399,"msg":"hello child!","pid":657,"hostname":"Davids-MBP-3.fritz.box","a":"property"}
For using Pino with a web framework see:
http
The pino-pretty
module can be used to format logs during development:
Due to Node's single-threaded event-loop, it's highly recommended that sending, alert triggering, reformatting and all forms of log processing be conducted in a separate process or thread.
In Pino terminology we call all log processors "transports", and recommend that the transports be run in a worker thread using our pino.transport
API.
For more details see our Transports⇗ document.
Using minimum resources for logging is very important. Log messages tend to get added over time and this can lead to a throttling effect on applications – such as reduced requests per second.
In many cases, Pino is over 5x faster than alternatives.
See the Benchmarks document for comparisons.
Pino supports to being bundled using tools like webpack or esbuild.
See Bundling document for more informations.
https://www.npmjs.com/~matteo.collina
https://twitter.com/matteocollina
https://github.com/davidmarkclements
https://www.npmjs.com/~davidmarkclements
https://twitter.com/davidmarkclem
https://www.npmjs.com/~jsumners
https://twitter.com/jsumners79
Pino is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the CONTRIBUTING.md file for more details.
This project was kindly sponsored by nearForm.
Logo and identity designed by Cosmic Fox Design: https://www.behance.net/cosmicfox.
Author: Pinojs
Source Code: https://github.com/pinojs/pino
License: View license
1612595276
**Purchase Now !!! Snap on the Link beneath for more data. Rush !!!
**
Official Website:- http://wintersupplement.com/fast-fit-keto/
Fast Fit Keto Reviews – Everyone ought to lessen their weight. On the off chance that you could get thinner in a couple of days without contributing energy or exertion, you would. That is the reason incalculable individuals are taking Fast Fit Keto pills to consume fat quicker and simpler than at any other time. With this extraordinary keto formula, your body will get just the fixings it needs to become accustomed to ketosis so you can begin getting more fit immediately. In the primary month, you can shed five pounds or more. Come these lines through our Fast Fit Keto audit to discover how this astounding ketogenic weight reduction supplement can assist you with getting in shape quicker and simpler than at any other time in late memory. Something else, click on the example underneath to check whether you can ensure a 40% Discounted offer of the top rated ketogenic pills for weight reduction before the arrangement closures or supplies run out.
**What is Fast Fit Keto audits? **
Getting the best and flawless shape has been the normal longing for everyone The world has been encountering a gigantic transition of getting a hot shape, yet an awful way of life and numerous different things influence their cravings. Yet, there are supplements like Body Fast Fit Keto surveys a nature-based thing which has discernibly bring back the lost gracefulness of the body by managing unfortunate fats from the body. This thing has various properties and can be utilized in different issues.
Fast Fit Keto Reviews cost In bygone eras when there were not strong helpful focuses available, this plant has been used to treat heart issues and sometimes in excessively touchy conditions. It is local and generally, used as a piece of Ayurveda treatment. As demonstrated by experts this thing constructs the immunity, endurance, seethes fat, and augmentation slant mass. This enhancement show rapidly after use and starts dissolving the gathering of extra fat present on the body. The two guys and females can use this thing to make a slim and engaging body. Consequently you should go for this thing and endeavor to change your personality.
http://wintersupplement.com/fast-fit-keto/
https://www.stageit.com/fastfitketobuy
https://dribbble.com/fastfitketobuy
https://linktr.ee/fastfitketoreviews
https://www.startus.cc/company/fast-fit-keto-shark-tank
https://secure.aspca.org/team/fast-fit-keto-reviews
https://www.facebook.com/sharktankdietsreviews/posts/1496584900547209
https://thenevadaview.com/fast-fit-keto/
https://k12.instructure.com/eportfolios/20408/
https://twitter.com/FastFitKetoSha1
https://www.facebook.com/supplementsworldofficial/videos/134442571858804/
https://zenodo.org/record/4506017#.YBzp0fnhUdU
https://www.completefoods.co/diy/recipes/fast-fit-keto-update-2021-user-exposed-truth-read-now
https://gocrowdera.com/US/other/fast-fit-keto/
https://sites.google.com/view/fast-fit-keto-shark-tank/
https://talknchat.net/read-blog/5805_fast-fit-keto-shark-tank-final-verdict-2021.html
http://snomoto.com/fast-fit-keto-reviews-pills-shark-tank-scam-where-to-buy/
https://www.docdroid.net/IoNNGnO/fast-fit-keto-shark-tank-pdf
https://www.docdroid.net/g8hM6Ww/fast-fit-keto-reviews-pdf
#fast fit keto shark tank #fast fit keto reviews #fast fit keto #fast fit keto reviews 2021
1654761240
pino
Very low overhead Node.js logger.
$ npm install pino
If you would like to install pino v6, refer to https://github.com/pinojs/pino/tree/v6.x.
const logger = require('pino')()
logger.info('hello world')
const child = logger.child({ a: 'property' })
child.info('hello child!')
This produces:
{"level":30,"time":1531171074631,"msg":"hello world","pid":657,"hostname":"Davids-MBP-3.fritz.box"}
{"level":30,"time":1531171082399,"msg":"hello child!","pid":657,"hostname":"Davids-MBP-3.fritz.box","a":"property"}
For using Pino with a web framework see:
http
The pino-pretty
module can be used to format logs during development:
Due to Node's single-threaded event-loop, it's highly recommended that sending, alert triggering, reformatting and all forms of log processing be conducted in a separate process or thread.
In Pino terminology we call all log processors "transports", and recommend that the transports be run in a worker thread using our pino.transport
API.
For more details see our Transports⇗ document.
Using minimum resources for logging is very important. Log messages tend to get added over time and this can lead to a throttling effect on applications – such as reduced requests per second.
In many cases, Pino is over 5x faster than alternatives.
See the Benchmarks document for comparisons.
Pino supports to being bundled using tools like webpack or esbuild.
See Bundling document for more informations.
https://www.npmjs.com/~matteo.collina
https://twitter.com/matteocollina
https://github.com/davidmarkclements
https://www.npmjs.com/~davidmarkclements
https://twitter.com/davidmarkclem
https://www.npmjs.com/~jsumners
https://twitter.com/jsumners79
Pino is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the CONTRIBUTING.md file for more details.
This project was kindly sponsored by nearForm.
Logo and identity designed by Cosmic Fox Design: https://www.behance.net/cosmicfox.
Author: Pinojs
Source Code: https://github.com/pinojs/pino
License: View license
1608778496
FastSwap A decentralized exchange for erc20 Token and cross-chain swap powered by Polkadot. FastSwap is a bundle of different dapps in one place, from token swap to p2p, nft, vaults etc. Just like Sushiswap Fastswap share trading fees with Fast Holders.
FastSwap is a decentralized protocol for automated liquidity provision on Ethereum, Tron Network, BSC etc. + Cross-Chain Swap through Parachain on Polkadot.
Would you like to earn many tokens and cryptocurrencies right now! ☞ CLICK HERE
Looking for more information…
☞ Website
☞ Explorer
☞ Source Code
☞ Social Channel
☞ Coinmarketcap
Thank for visiting and reading this article! I’m highly appreciate your actions! Please share if you liked it!
#blockchain #bitcoin #crypto #fastswap #fast
1649689380
Onelog
Onelog is a dead simple but very efficient JSON logger. It is one of the fastest JSON logger out there. Also, it is one of the logger with the lowest allocation.
It gives more control over log levels enabled by using bitwise operation for setting levels on a logger.
It is also modular as you can add a custom hook, define level text values, level and message keys.
Go 1.9 is required as it uses a type alias over gojay.Encoder.
It is named onelog as a reference to zerolog and because it sounds like One Love
song from Bob Marley :)
go get github.com/francoispqt/onelog
Basic usage:
import "github.com/francoispqt/onelog"
func main() {
// create a new Logger
// first argument is an io.Writer
// second argument is the level, which is an integer
logger := onelog.New(
os.Stdout,
onelog.ALL, // shortcut for onelog.DEBUG|onelog.INFO|onelog.WARN|onelog.ERROR|onelog.FATAL,
)
logger.Info("hello world !") // {"level":"info","message":"hello world"}
}
Levels are ints mapped to a string. The logger will check if level is enabled with an efficient bitwise &(AND), if disabled, it returns right away which makes onelog the fastest when running disabled logging with 0 allocs and less than 1ns/op. See benchmarks
When creating a logger you must use the |
operator with different levels to toggle bytes.
Example if you want levels INFO and WARN:
logger := onelog.New(
os.Stdout,
onelog.INFO|onelog.WARN,
)
This allows you to have a logger with different levels, for example you can do:
var logger *onelog.Logger
func init() {
// if we are in debug mode, enable DEBUG lvl
if os.Getenv("DEBUG") != "" {
logger = onelog.New(
os.Stdout,
onelog.ALL, // shortcut for onelog.DEBUG|onelog.INFO|onelog.WARN|onelog.ERROR|onelog.FATAL
)
return
}
logger = onelog.New(
os.Stdout,
onelog.INFO|onelog.WARN|onelog.ERROR|onelog.FATAL,
)
}
Available levels:
You can change their textual values by doing, do this only once at runtime as it is not thread safe:
onelog.LevelText(onelog.INFO, "INFO")
You can define a hook which will be run for every log message.
Example:
logger := onelog.New(
os.Stdout,
onelog.ALL,
)
logger.Hook(func(e onelog.Entry) {
e.String("time", time.Now().Format(time.RFC3339))
})
logger.Info("hello world !") // {"level":"info","message":"hello world","time":"2018-05-06T02:21:01+08:00"}
Context allows enforcing a grouping format where all logs fields key-values pairs from all logging methods (With, Info, Debug, InfoWith, InfoWithEntry, ...etc) except for values from using logger.Hook
, will be enclosed in giving context name provided as it's key. For example using a context key "params" as below
logger := onelog.NewContext(
os.Stdout,
onelog.INFO|onelog.WARN,
"params"
)
logger.InfoWithFields("breaking news !", func(e onelog.Entry) {
e.String("userID", "123455")
})
// {"level":"info","message":"breaking news !", "params":{"userID":"123456"}}
This principle also applies when inheriting from a previous created logger as below
parentLogger := onelog.New(
os.Stdout,
onelog.INFO|onelog.WARN,
)
logger := parentLogger.WithContext("params")
logger.InfoWithFields("breaking news !", func(e onelog.Entry) {
e.String("userID", "123455")
})
// {"level":"info","message":"breaking news !", "params":{"userID":"123456"}}
You can always reset the context by calling WithContext("")
to create a no-context logger from a context logger parent.
Logging without extra fields is easy as:
logger := onelog.New(
os.Stdout,
onelog.ALL,
)
logger.Debug("i'm not sure what's going on") // {"level":"debug","message":"i'm not sure what's going on"}
logger.Info("breaking news !") // {"level":"info","message":"breaking news !"}
logger.Warn("beware !") // {"level":"warn","message":"beware !"}
logger.Error("my printer is on fire") // {"level":"error","message":"my printer is on fire"}
logger.Fatal("oh my...") // {"level":"fatal","message":"oh my..."}
Logging with extra fields is quite simple, specially if you have used gojay:
logger := onelog.New(
os.Stdout,
onelog.ALL,
)
logger.DebugWithFields("i'm not sure what's going on", func(e onelog.Entry) {
e.String("string", "foobar")
e.Int("int", 12345)
e.Int64("int64", 12345)
e.Float("float64", 0.15)
e.Bool("bool", true)
e.Err("err", errors.New("someError"))
e.ObjectFunc("user", func(e Entry) {
e.String("name", "somename")
})
})
// {"level":"debug","message":"i'm not sure what's going on","string":"foobar","int":12345,"int64":12345,"float64":0.15,"bool":true,"err":"someError","user":{"name":"somename"}}
logger.InfoWithFields("breaking news !", func(e onelog.Entry) {
e.String("userID", "123455")
})
// {"level":"info","message":"breaking news !","userID":"123456"}
logger.WarnWithFields("beware !", func(e onelog.Entry) {
e.String("userID", "123455")
})
// {"level":"warn","message":"beware !","userID":"123456"}
logger.ErrorWithFields("my printer is on fire", func(e onelog.Entry) {
e.String("userID", "123455")
})
// {"level":"error","message":"my printer is on fire","userID":"123456"}
logger.FatalWithFields("oh my...", func(e onelog.Entry) {
e.String("userID", "123455")
})
// {"level":"fatal","message":"oh my...","userID":"123456"}
Alternatively, you can use the chain syntax:
logger.InfoWith("foo bar").
Int("testInt", 1).
Int64("testInt64", 2).
Float("testFloat", 1.15234).
String("testString", "string").
Bool("testBool", true).
ObjectFunc("testObj", func(e Entry) {
e.Int("testInt", 100)
}).
Object("testObj2", testObj). // implementation of gojay.MarshalerJSONObject
Array("testArr", testArr). // implementation of gojay.MarshalerJSONArray
Err("testErr", errors.New("my printer is on fire !")).
Write() // don't forget to call this method!
You can create get a logger with some accumulated context that will be included on all logs created by this logger.
To do that, you must call the With
method on a logger. Internally it creates a copy of the current logger and returns it.
Example:
logger := onelog.New(
os.Stdout,
onelog.ALL,
).With(func(e onelog.Entry) {
e.String("userID", "123456")
})
logger.Info("user logged in") // {"level":"info","message":"user logged in","userID":"123456"}
logger.Debug("wtf?") // {"level":"debug","message":"wtf?","userID":"123456"}
logger.ErrorWithFields("Oops", func(e onelog.Entry) {
e.String("error_code", "ROFL")
}) // {"level":"error","message":"oops","userID":"123456","error_code":"ROFL"}
You can change globally the levels values by calling the function:
onelog.LevelText(onelog.INFO, "INFO")
You can change the key of the message by calling the function:
onelog.MsgKey("msg")
You can change the key of the level by calling the function:
onelog.LevelKey("lvl")
Beware, these changes are global (affects all instances of the logger). Also, these function should be called only once at runtime to avoid any data race issue.
Benchmarks
For thorough benchmarks please see the results in the bench suite created by the author of zerolog here: https://github.com/rs/logbench
The benchmarks data presented below is the one from Uber's benchmark suite where we added onelog.
Benchmarks are here: https://github.com/francoispqt/zap/tree/onelog-bench/benchmarks
ns/op | bytes/op | allocs/op | |
---|---|---|---|
Zap | 8.73 | 0 | 0 |
zerolog | 2.45 | 0 | 0 |
logrus | 12.1 | 16 | 1 |
onelog | 0.74 | 0 | 0 |
ns/op | bytes/op | allocs/op | |
---|---|---|---|
Zap | 208 | 768 | 5 |
zerolog | 68.7 | 128 | 4 |
logrus | 721 | 1493 | 12 |
onelog | 1.31 | 0 | 0 |
onelog-chain | 68.2 | 0 | 0 |
ns/op | bytes/op | allocs/op | |
---|---|---|---|
Zap | 205 | 0 | 0 |
zerolog | 135 | 0 | 0 |
logrus | 1256 | 1554 | 24 |
onelog | 84.8 | 0 | 0 |
ns/op | bytes/op | allocs/op | |
---|---|---|---|
Zap | 276 | 0 | 0 |
zerolog | 141 | 0 | 0 |
logrus | 1256 | 1554 | 24 |
onelog | 82.4 | 0 | 0 |
ns/op | bytes/op | allocs/op | |
---|---|---|---|
Zap | 1764 | 770 | 5 |
zerolog | 1210 | 128 | 4 |
logrus | 13211 | 13584 | 129 |
onelog | 971 | 128 | 4 |
onelog-chain | 1030 | 128 | 4 |
Author: Francoispqt
Source Code: https://github.com/francoispqt/onelog
License: MIT License