Skip to content
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

Feature request: Consider splitting out the standalone mock-oauth2-server to avoid exposing the logback configuration to users #403

Closed
frehov opened this issue Dec 30, 2022 · 3 comments · Fixed by #667
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@frehov
Copy link

frehov commented Dec 30, 2022

Just a suggestion, but consider splitting out the StandaloneMockOAuth2Server along with the logback.xml file to a separate library/runnable.
Currently if there's no logback.xml or logback-test.xml defined in the importing project then logback will pick up the provided implementation which now comes from mock-oauth2-server.
Alternatively consider overriding the logback.configurationFile property before starting the standalone server and/or rename the file to something like logback-standalone.xml

Additionaly layout + pattern is a deprecated construct in logback, use an encoder instead. https://logback.qos.ch/codes.html#layoutInsteadOfEncoder

<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{70} - %msg%n</pattern>
    </encoder>
</appender>

the above would be the correct configuration.

The following is output from the logging system showing that the logback.xml is bundled with the library and the warning about the deprecated construct mentioned above.
image

@ybelMekk ybelMekk added enhancement New feature or request good first issue Good for newcomers labels Jan 2, 2023
@ybelMekk
Copy link
Contributor

ybelMekk commented Jan 3, 2023

Hi @frehov

Seems like a good suggestion.

Thank you for opening this issue, please open a PR if you have time.

pease

Y

@github-actions
Copy link

github-actions bot commented Mar 6, 2023

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Mar 6, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2023
@ybelMekk ybelMekk linked a pull request Apr 16, 2024 that will close this issue
@ybelMekk ybelMekk removed the stale label Apr 16, 2024
@ybelMekk ybelMekk reopened this Apr 16, 2024
tommytroen added a commit that referenced this issue Apr 17, 2024
* fix deprecated pattern layout
* rename to logback-standalone.xml as to not override any default logback.xml files
* add env var to byo config file
fix #403 and #658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
2 participants