13 lines
317 B
JavaScript
13 lines
317 B
JavaScript
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
|
|
);
|
|
}
|
|
};
|
|
}
|