This repository has been archived by the owner on Dec 24, 2022. It is now read-only.
Releases: mrbrianevans/timer-logs
Releases · mrbrianevans/timer-logs
v1.7.4
v1.6.0
New feature:
This release contains a new function on the Timer interface to log a SQL query in a specially formatted way.
timer.tsql`SELECT * FROM persons p join birthdays b ON p.date=b.date WHERE name='tom' AND b.age > 35 OR name=${name}`;
There is also a general logging method which makes use of tagged template literals:
const order = { code: "0001", qty: 81, items: [1, 2, 3] };
timer.tlog`New order received: ${order}`;
produces this log:
New order received: '{"code":"0001","qty":81,"items":[1,2,3]}'
v1.4.0
Added different presenters depending on the environment, so that logs are printed in a special way for development, production and in-browser.
v1.2.2
Changelog in this release:
- an
operationTime
timer will be started by default when the class is instantiated, and logged whenflush()
is called. This is particularly helpful for the Google Cloud Logging summary line feature - a message will always be provided with log output
- postgres errors will give a default message if the error does not contain one
- all logs get a default message in the rare occurance that one slips though without a message