Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

[Technical Debt] top level console override (replacement for 2532) #2537

Merged
merged 2 commits into from
Mar 16, 2022

Conversation

W3stside
Copy link
Contributor

Potential replacement of #2532

Part of #1887

Testing

check PRaul for logs

@github-actions
Copy link
Contributor

  • 🔭 GP Swap: CoW Protocol v2 Swap UI

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Definitely much cleaner.

Is there a way to override the behaviour if we ever want to, though?

Let's say there are cases where we still might want to log something. Shouldn't we still be able to?

@W3stside
Copy link
Contributor Author

Definitely much cleaner.

Is there a way to override the behaviour if we ever want to, though?

Let's say there are cases where we still might want to log something. Shouldn't we still be able to?

... that's a good point, let me do sth

@W3stside
Copy link
Contributor Author

also I've added console.error as well to this. do we want this ux?

@alfetopito
Copy link
Contributor

Definitely much cleaner.
Is there a way to override the behaviour if we ever want to, though?
Let's say there are cases where we still might want to log something. Shouldn't we still be able to?

... that's a good point, let me do sth

You haven't pushed yet, have you?

Assuming not, I would suggest and optional force parameter that ignores the environment when set:

console.log('shit, this should be visible, ALWAYS!!', force=true)
// OR
console.force.log('same thing...')

The second option would be a proxy/wrapper that invokes regular logging fns.

WDYT?

@W3stside
Copy link
Contributor Author

Definitely much cleaner.
Is there a way to override the behaviour if we ever want to, though?
Let's say there are cases where we still might want to log something. Shouldn't we still be able to?

... that's a good point, let me do sth

You haven't pushed yet, have you?

Assuming not, I would suggest and optional force parameter that ignores the environment when set:

console.log('shit, this should be visible, ALWAYS!!', force=true)
// OR
console.force.log('same thing...')

The second option would be a proxy/wrapper that invokes regular logging fns.

WDYT?

i like the second

@W3stside
Copy link
Contributor Author

@alfetopito 713872c

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Noice!

@W3stside W3stside merged commit c01d30a into develop Mar 16, 2022
@W3stside W3stside deleted the override-console branch March 16, 2022 09:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants