Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger in Vue Router #5

Open
laygir opened this issue Apr 20, 2023 · 0 comments
Open

Logger in Vue Router #5

laygir opened this issue Apr 20, 2023 · 0 comments

Comments

@laygir
Copy link

laygir commented Apr 20, 2023

Hello 👋

Thank you very much for this fork, I have been using it's vue 2 versoin for years and when I saw this I was very happy to switch over to this package when switching to vue 3.

Now I am trying to get a hold of my logger instance in Vue Router and Pinia.

For Pinia, I am doing this:

const app = createApp(App);
const pinia = createPinia();

pinia.use(({ store }) => {
  store.$log = markRaw(app.config.globalProperties.$log);
});

app.use(pinia);
app.use(router);
app.use(logger);

app.mount('#app');

And it works nice, but for Vue Router, I couldn't figure out. What would you suggest I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant