-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Logging article update, log4j2 #476
Comments
Sure! |
I will take the admin page.
|
I will review and add content later then. Go ahead @bgilmer77 ! |
@AngelosF it might be better if you go ahead and then I contribute later. I won't be able to get to it for a couple of days. |
@bgilmer77 I've invited you to become a contributor for the openHAB project. That's needed to assign you to this and other issues. |
@ThomDietrich Done. |
@ThomDietrich @bgilmer77 Most people are still on log4j1 since they are running versions lower than OH2.2 Snapshot 1009 that included the Karaf 4.1.2 which brings along log4j2. I will start typing up a PR for this but we could either: wdyt? |
@ThomDietrich I guess we are at the point where we really should think about the docu split into different versions - did you already spend any further thoughts on this? (btw, thanks for taking care about docs update regarding logging; this is again something that I didn't spend enough thoughts on when doing the Karaf upgrade...) |
@kaikreuzer, is the idea of a document split that there is one version for 1.x, and another version for 2.x? Or do you mean to split the documentation some other way? |
This is a good example of a docs split: https://github.com/influxdata/docs.influxdata.com/tree/master/content/influxdb i.e.: Maybe we should group the docs in the same way. I also like the http://docs.grafana.org/ for the right hand menu (with "edit this page" and other nice links) |
@AngelosF - as you can tell, I was working through my email in reverse chronological order ;-). Interestingly, I was just thinking about the steps to start on the logging section, and it first occurred to me that, since I am running Raspbian Jessie on the apt stable main branch, I would need to pull down the snapshot instead. No problem - create a Ubuntu VM and do it. But as you point out, most people will not be using 4j2 until it goes to the stable branch, so this could be pretty confusing. In fact, @kaikreuzer , it occurred to me that as OH grows, perhaps it would be good to include a short statement in any significant announcements such as the one regarding the logging update that says something like, "This functionality is now available in openHab 2.2, Snapshot 1009." "It will be part of the next Stable release which should be available in X weeks/months/whatever." Or words to that effect. Back to @AngelosF 's point, my first thought would be to suggest one document on logging, with some sort of tag which indicates that a particular section is specific to 4j1, and another tag for 4j2. This would keep people from having to bounce around in the documentation. But a disadvantage of this is that 4j1 is forever enshrined in the logging documentation page. Another possibility is to say at the top, "THIS PAGE APPLIES TO J42. A LOGGING PAGE FOR J41 MAY BE FOUND HERE." "You can determine your logging version by [insert instructions on determining whether you are running j41 or j42 here]." Then we archive the current page with a link to it from the new page, and publish only the new page in the main documentation. As I think this through, I like the second option best. Yes, initially 95% of the readers will be clicking the link to the j41 document, but that will change over time. Of course, it will create support chatter with posts from people who did not read the initial part at the top about going to the older documentation, but leaving the old stuff in forever seems like a mistake. A third option would be to tag the sections 4j1 or 4j2 where there are differences as in my first suggestion, and then go back and implement the second option of a separate document at a later time. The tags would (theoretically) make this a quick job. My two cents. |
@bgilmer77 Please wait for @ThomDietrich to comment, we had this all already discussed in detail. |
I understand. Yes, using the power of a versioned repo makes sense.
|
Just a word of warning - the Karaf guys just updated their docs to also describe log4j2 configuration and they seem to have decided to go for XML instead of property file format. In the light of openhab/openhab-distro#516, XML might also be for us the better option - so I would suggest to not put too much effort in the documentation yet, until openhab/openhab-distro#516 is solved. |
Isn't JSON prettier? :) I was thinking to try both alternatives (xml and json) and try to use json. Either way, I wait for your updates. XML syntax for the config file is fine! (definitely better than the old style properties config) |
Look at it, it is all red! |
Ok, I am a Panathinaikos supporter, so green is my color (closer to XML) ! Standing by for openhab/openhab-distro#516 till docs update We also need @ThomDietrich 's input with regards to the docs split :) |
Hey guys!
I hope I got everything. What do you think? |
I am not sure if I got it right... (it must be the summer time, beaches and beer) 🌞 I think that I agree, but let's clarify... Should we go ahead and type up a completely new docs entry focusing on log4j2 and add some remarks whenever we have differences for the log4j1 content? That would not be easy since the changes are mostly in the configuration section and that's not easy to cover with 2 sample configs (people will be confused). I propose the following approach:
Reasons: If we are ok with this approach, I can start typing up a first draft of the new logging docs entry and then we can all revise it. |
You are making a good point. Let's do that ;) Prost 🍻 |
This seems like a good approach. I will wait until @AngelosF has posted the first draft and then will comment, unless @AngelosF, there is some logical way to divide and conquer the work. I expect not. Usually it is best if the first draft is written by one person so it all has the same construction. In any case, I am here if you need me to do anything. |
It has been almost impossible for me to find 1-2 hours of free time to sit down and type up the first draft of the docs article... :( I will try during the w/end to see if I can progress this one. |
@AngelosF, no problem - I am standing by. I have put together a development system running the snapshot so that I can compare the two systems running the different loggers. |
Closes openhab#476 (yes, 1 year later 👍 ) Signed-off-by: Angelos Fountoulakis [email protected] (github: AngelosF)
Hey @bgilmer77 ! Finally, I created a PR to update this docs entry :) Check it please to see if we can further improve it: #814 |
* Update Logging article, log4j2 Closes #476 (yes, 1 year later 👍 ) Signed-off-by: Angelos Fountoulakis [email protected] (github: AngelosF) * Further updates on logging.md [!] Changed the introductory text in section `#defining-what-to-log` [!] Split the text in section `#defining-what-to-log` to one line per sentence [!] Minor cosmetic improvements Signed-off-by: Angelos Fountoulakis [email protected] (github: AngelosF) * Removed unnecessary blank lines Signed-off-by: Jerome Luckenbach <[email protected]>
@AngelosF I already commented on your PR, but it looks very good. Thank you. |
In response to the merge of karaf 4.1.2 we should update the logging article, in general and with log4j2 specific notes. It would also be great to include examples for add-on specific logging and the possibility to add new appenders.
@AngelosF @bgilmer77 volunteers? :)
The text was updated successfully, but these errors were encountered: