Skip to content

Logger in Vue Router #5

@laygir

Description

@laygir

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions