You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide more flexibility to the developer to display or hide the log messages. Sometimes is interesting look now the peer group is connecting to other peers or what messages is receiving, but sometimes not and it's quite overwhelming and difficult to find what you want in the console.
Describe what you've considered?
First of all a Logger class is required as a unique point in the app to send the log messages. This provides a lot of flexibility: easy to change from console to a file or any other place, and be able to change the way to manage the log messages in even in execution time by setting a few parameters.
Is very common have log messages with different priorities: verbose, warning, info, error. In my own opinion, this is fine and could be considered as a standard but still ambiguous: the developer considers what has the priority of info or warning.
You be nice to be able to filter this log messages by tags. For example: blockstore, peer, wallet... Different purposes with different tags, so I can set in the log class the tags of the purposes I want to get displayed.
Code sample / Spec
Sample to customize the log messages. All the tags could be enable by default: Logger.showTags( tags: [LogTag.Blockstore, LogTag.Peers] )
Sample to send messages to the log: Logger.log( message: "My blockstore message", tag: LogTag.Blockstore)
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
Provide more flexibility to the developer to display or hide the log messages. Sometimes is interesting look now the peer group is connecting to other peers or what messages is receiving, but sometimes not and it's quite overwhelming and difficult to find what you want in the console.
Describe what you've considered?
First of all a
Logger
class is required as a unique point in the app to send the log messages. This provides a lot of flexibility: easy to change from console to a file or any other place, and be able to change the way to manage the log messages in even in execution time by setting a few parameters.Is very common have log messages with different priorities:
verbose
,warning
,info
,error
. In my own opinion, this is fine and could be considered as a standard but still ambiguous: the developer considers what has the priority ofinfo
orwarning
.You be nice to be able to filter this log messages by tags. For example:
blockstore
,peer
,wallet
... Different purposes with different tags, so I can set in the log class the tags of the purposes I want to get displayed.Code sample / Spec
Sample to customize the log messages. All the tags could be enable by default:
Logger.showTags( tags: [LogTag.Blockstore, LogTag.Peers] )
Sample to send messages to the log:
Logger.log( message: "My blockstore message", tag: LogTag.Blockstore)
The text was updated successfully, but these errors were encountered: