waffle/frontend/src/logging.js

14 lines
317 B
JavaScript
Raw Normal View History

2022-05-05 20:52:35 +03:00
import { getItem } from "./storage";
export default function logger(sink) {
return (...args) => {
if (getItem(`loggingSink:${sink}`)) {
console.log(
`%c[${sink}]`,
"color: #8f3f71; font-weight: bold;",
...args
);
}
};
}