This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Dev multi app#82
Merged
Merged
Conversation
…through functions. [CHANGE] pxlogger is now externalized since it's needed for instantiation. [TODO] request is still a singleton. [CHANGE] pxClient now requires config in init() method. [CHANGE] setting the agent for request has a new method. [REFACTOR] PxConfig to have less redundant code. [CHANGE] moved extractIP from pxcontext to utils.
[ADD] changelog notes.
|
Why do you need to inject the logger everywhere now? what was the problem with the way it was before? |
Contributor
Author
|
It has a state (debug and app id) which differs between apps, and it was global (singleton) before. |
|
it makes no sense to pass the logger around like that. find a better way. maybe put it on the context? |
Contributor
Author
|
Yes, it's possible. There are many things that are not as I would like there. Tried to make minimal changes. If we put it in context we will still have many places to inject (in the small functions that don't have the context) so it will only solve a part of the problem. |
[REFACTOR] injected logger into config to use it from config [REFACTOR] pxCtx -> ctx [FIX] creating the default and internal configs to remain stateless.
yaronschwimmer
approved these changes
Mar 12, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.