Skip to content

Conversation

@graycraft
Copy link
Member

@graycraft graycraft commented Oct 25, 2025

Description

Add "Verbose logging in Console" dropdown — to show additional logs only when this is enabled

Related issue

Closes #867

External links (optional)

N/A

Screenshots or videos (optional)

N/A

Breaking changes

None

How to test

  1. Open page /options/dev-screens.
  2. Select logging level.

Notes for reviewers

None

Checklist

  • Code is formatted
  • Log messages in console shows depending on selected verbosity level
  • Changes tested in all relevant environments

@vercel
Copy link

vercel bot commented Oct 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
adamant-im Ready Ready Preview Comment Oct 25, 2025 8:23pm

@github-actions
Copy link

Deployed to https://msg-adamant-pr-912.surge.sh 🚀

@graycraft graycraft marked this pull request as ready for review October 27, 2025 15:49
@graycraft graycraft requested a review from a team as a code owner October 27, 2025 15:49
Comment on lines +1 to +37
import type { ActionTree, GetterTree, MutationTree } from 'vuex'

import { RootState } from '@/store/types'

interface VerbosityState {
levelAll: level[]
levelCurrent: level
}

const actions: ActionTree<VerbosityState, RootState> = {
setLevel({ commit }, value) {
commit('setLevel', value)
}
}
const getters: GetterTree<VerbosityState, RootState> = {
levelAll: (state) => state.levelAll,
levelCurrent: (state) => state.levelCurrent
}
const mutations: MutationTree<VerbosityState> = {
setLevel(state, value) {
state.levelCurrent = value
}
}
const state = (): VerbosityState => ({
levelAll: ['Debug', 'Info', 'Public', 'Warn'],
levelCurrent: 'Public'
})

export type level = 'Debug' | 'Info' | 'Public' | 'Warn'

export default {
actions,
getters,
mutations,
namespaced: true,
state
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's pinia store

@S-FrontendDev
Copy link
Member

can you explain how it works? You just added new setting for dev screen. But you don't use this setting for logging. I don't understand this PR

@dev-adamant-im
Copy link
Member

@graycraft

  1. Match existing UI styles

Please apply the same visual styles as used for other options (e.g., Vibrations, Wallets).

image
  1. Add the actual log function

We should include the complete logger function, e.g.:

log(callerName, logLevel, message)
  1. Show developers how to use the logger when switching log levels

Please provide an example of how this logger should be used ⟶ when the user changes the verbosity level in the app, trigger:

logger.log('Dev screen', logLevel, 'This is the verbose logger example.')

logLevel should be case-insensitive ('Warn', 'warn', 'WARN' all work).

Expected output, e.g.,:

[Dev screen] | debug | This is the verbose logger example.'

Notes

Verbosity from high to low:
Debug > Info > Warn > Public

This means:

  • If the user selects Warn in the UI, then:
logger.log('Dev screen', 'info', 'This is the verbose logger example.')

➡️ Nothing should be printed.

logger.log('Dev screen', 'warn', 'This is the verbose logger example.')

➡️ The message should be printed.

@dev-adamant-im dev-adamant-im added Automation Automated scripts, GitHub Actions, workflows, or task runners JavaScript Frontend or backend code in JavaScript labels Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Automation Automated scripts, GitHub Actions, workflows, or task runners JavaScript Frontend or backend code in JavaScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] Add "Verbose logging in Console" in developer mode

5 participants