Skip to content

wd_demo: improved messages in console #288

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

Merged
merged 3 commits into from
Apr 12, 2022
Merged

wd_demo: improved messages in console #288

merged 3 commits into from
Apr 12, 2022

Conversation

mlipok
Copy link
Contributor

@mlipok mlipok commented Apr 9, 2022

Pull request

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.

Please ensure you have read and noticed the checklist below.

Checklist

Put an x in the boxes that apply. If you're unsure about any of them, don't hesitate to ask. We are here to help!

This is simply a reminder of what we are going to look for before merging your code.

  • I have read and noticed the CODE OF CONDUCT document
  • I have read and noticed the CONTRIBUTING document
  • I have added necessary documentation or screenshots (if appropriate)

Types of changes

Please check x the type of change your PR introduces:

  • Bugfix (change which fixes an issue)
  • Feature (change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (functional, structural)
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

wd_demo.au3 messages in console were distinguishable from wd_core.au3 and wd_helper.au3 only by color

What is the new behavior?

currently wd_demo.au3 messages in console are prefixed with wd_demo.au3:
This helps to distinguish demo messages from UDF messages

Additional context

Add any other context about the problem here.

System under test

Please complete the following information.

  • OS: [e.g. Windows 10]
  • OS Arch.: [e.g. X64]
  • Browser [e.g. firefox]
  • Browser version [e.g. 96.0.3]

@Danp2
Copy link
Owner

Danp2 commented Apr 11, 2022

I don't see why this change is needed since (as you've already pointed out) you can identify the wd_demo "messages" by color. Technically, you could also use RegEx to locate the lines beginning with the character set [^+-!].

P.S. I see that we are using all four of these prefixes (^, +, -, and !). Is that needed / desirable?

@mlipok
Copy link
Contributor Author

mlipok commented Apr 11, 2022

It helps me a lot in understanding what I see in the logs.
This is something like contextuall reading.
In this way I have better focus on messages wd_demo.au3.
I can easily distinguish them from UDF messages.

The same way it should help new commers to easier understand how the wd_demo.au3 code works.

BLUE: bypassing DEMO
GREEN: StartEnd DEMO
ORANGE: Internal DEMO information

GRAY: UDF Messages.

image

@Danp2
Copy link
Owner

Danp2 commented Apr 11, 2022

Ok, but I don't see how adding "wd_demo.au3" improves the readability of the log. Personally, I would think adding "ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : " would be much more beneficial so that they can see which line generated the message and quickly jump to it.

@mlipok
Copy link
Contributor Author

mlipok commented Apr 11, 2022

Personally, I would think adding "ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : " would be much more beneficial so that they can see which line generated the message and quickly jump to it.

Thanks.

Take a look on: F4 Feature

@Danp2
Copy link
Owner

Danp2 commented Apr 11, 2022

Take a look on: F4 Feature

It isn't clear exactly what you wanted me to see. From what I can see, you can't use the prefixes in combination with @ to get the line jump feature.

@mlipok
Copy link
Contributor Author

mlipok commented Apr 12, 2022

Ok, but I don't see how adding "wd_demo.au3" improves the readability of the log.

It cleary states that it comes from "wd_demo.au3", as a result, you do not have to wonder what this message is about.
I know it was probably clear to you anyway, but for others it has to be clearer.

@Danp2
Copy link
Owner

Danp2 commented Apr 12, 2022

Fine. However, some of your changes seem inconsistent. For example --

ConsoleWrite("> wd_demo.au3: _WD_Startup" & @CRLF)

vs

ConsoleWrite("wd_demo.au3: (" & @ScriptLineNumber & ") : URL=" & _WD_Action($sSession, 'url') & @CRLF)

Shouldn't these be formatted in a similar fashion?

@mlipok
Copy link
Contributor Author

mlipok commented Apr 12, 2022

the first are from main fucntions
the other from the Demos

I would like to leave them as they are proposed.

@Danp2
Copy link
Owner

Danp2 commented Apr 12, 2022

🤷‍♂️

@Danp2 Danp2 merged commit a5966c5 into Danp2:master Apr 12, 2022
@mlipok mlipok deleted the patch-3 branch April 12, 2022 23:03
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

Successfully merging this pull request may close these issues.

2 participants