BREAKING CHANGE
- Loggers now support arbitrary log messages, see 78334b3
Log functions no longer require a message string in the first argument, this means
reporters that used to tap into extra
for the spread arguments you will now
find this in the messages
array.
- const reporter: Reporter = ({ name, level, message, extra, ...rest })
+ const reporter: Reporter = ({ name, level, messages, ...rest })
..
- console.log({ message, extra });
+ const message = messages.shift();
+ console.log({ message, extra: messages });
- Browsers no longer
enable
by default, see a4d95bc
In the past we enbaled anyting in the DEBUG
localStorage key,
this lead to some undesired behaviours when working with sandboxed
iframes.
Now we will let the you control this completely, as from what I can see
the majority of folk I see, use it anyway.
Still makes sense to run this for Node applications, which is left un
touched.
If you want the existing behaviour, just attached this before you start
logging.
import { enable } from 'diary';
enable(localStorage.DEBUG || 'a^');
Full Changelog: v0.3.1...v0.4.0