-
Notifications
You must be signed in to change notification settings - Fork 30
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
create log stream twice #14
Comments
I am really not sure why. First thought is where this is running ? Are you running locally, just after some unit or integration tests ? Do you use the same logback config file for your tests ? Other things to have a look: Are you able to put a Are you able to reproduce this in a fresh small empty spring boot app ? If yes, please share it with me. Are you able to reproduce with the debugger attached ? If yes, please put a break point into the (IntelliJ decompiled) class |
Hi, |
Thank you for this test app, I can reproduce the behaviour you are seeing. I am still not sure why though. It may be related to the strange spring boot single jar class loading system. One thing I can see, is that your test app logs everything twice:
Anyways, I will have a look at this soon. |
I eliminated duplicate logs in my test app, but still create stream log twice |
I am sorry I did not reply sooner. This one is really a puzzle :) I manage to get the two stack trace that leads to
|
I guess we now have two options:
I prefer the 2nd option, it makes sense anyways, not only in the context of this bug |
Hi, I am sorry to delayed response. Yes, second option it is seem to good |
@Najdzionix as a Spring user myself, I never experienced such a behaviour. May I see your spring-test-app also? It's no more available. Going by the code of this appender, it looks more like there are two appenders started and the issue is actually withing the application. |
Hi @malkusch I do not delete app, you should be access it. https://github.com/Najdzionix/spring-test-app |
@malkusch The links @Najdzionix provided did not work for me either, but this one does |
I am sorry, I made mistake on create url, yes this is correct url (past & copy issue ...) |
As I remember, Spring Boot configures logging libraries programmatically. There is a chance, that logback is configured twice in example project:
I can't check this assumption right now, but hope it will help.. |
Spring boot configures the logging system twice. Once in a bootstrap Spring context configuration, and once for the 'final' application context. Actually, it's even allowed to configure it as many times as it wants, for example with hot reloading of logging properties. So Logback appenders that get created and destroyed dynamically is something that should be supported. |
See 5a3402f |
Hello,
![issue_loggger](https://user-images.githubusercontent.com/15202342/32780800-dfafb39a-c942-11e7-8454-a44bb2204751.png)
I configurate yours appender on my aplication ( I am using spring boot). But I have small issue, when app is starting create log stream twice (check attached screenshot) and one of always is empty
It is my logback configration:
logback.txt
The text was updated successfully, but these errors were encountered: