--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think log4j 2.x is absolutely worth exploring.
Though this plugin will be usable today for most stable branches and I've seen requests for exact this functionality in repo-discuss.
Note: The plugin does not affect the appenders configurations (outside of log levels) which is why we use it. We want to keep the logs exactly as Gerrits sets them up in the code (except for a few log-level adjustments). Exactly like how the sshd logging
command works today.
This works great for us, so I personally wont be exploring log4j 2.x. My proposal is that we open source this plugin, and if the functionality is not needed anymore in the future, we deprecate it.
/Gustaf
I recently found out that log4j 2.x version actually supports automatic reconfiguration at runtime [1], see the monitorInterval setting.Maybe it is worth exploring switching to log4j 2.x instead of creating a Gerrit plugin?
Am Montag, 24. September 2018 14:27:42 UTC+2 schrieb zivkov:I recently found out that log4j 2.x version actually supports automatic reconfiguration at runtime [1], see the monitorInterval setting.Maybe it is worth exploring switching to log4j 2.x instead of creating a Gerrit plugin?Gerrit recently switched to using Google's FLogger frontend for logging.FLogger still doesn't support log4j2 backend: [1]. Someone would haveto add it first, before we can perform that switch in Gerrit.On Mon, Sep 24, 2018 at 1:35 PM Gustaf Lundh <gustaf...@axis.com> wrote:Hi,Name:Gerrit Log Level Plug-inSuggested repo:plugins/log-levelDescription:Allows an administrator to persist configured log levels between restarts.
On Monday, September 24, 2018 at 2:03:44 PM UTC+1, David Ostrovsky wrote:
Am Montag, 24. September 2018 14:27:42 UTC+2 schrieb zivkov:I recently found out that log4j 2.x version actually supports automatic reconfiguration at runtime [1], see the monitorInterval setting.Maybe it is worth exploring switching to log4j 2.x instead of creating a Gerrit plugin?Gerrit recently switched to using Google's FLogger frontend for logging.FLogger still doesn't support log4j2 backend: [1]. Someone would haveto add it first, before we can perform that switch in Gerrit.On Mon, Sep 24, 2018 at 1:35 PM Gustaf Lundh <gustaf...@axis.com> wrote:Hi,Name:Gerrit Log Level Plug-inSuggested repo:plugins/log-levelDescription:Allows an administrator to persist configured log levels between restarts.I agree, the plugin wold be very useful.Any strong objections in creating the repo?
On 24 Sep 2018, at 14:33, Saša Živkov <ziv...@gmail.com> wrote:On Mon, Sep 24, 2018 at 3:28 PM lucamilanesio <luca.mi...@gmail.com> wrote:
On Monday, September 24, 2018 at 2:03:44 PM UTC+1, David Ostrovsky wrote:
Am Montag, 24. September 2018 14:27:42 UTC+2 schrieb zivkov:I recently found out that log4j 2.x version actually supports automatic reconfiguration at runtime [1], see the monitorInterval setting.Maybe it is worth exploring switching to log4j 2.x instead of creating a Gerrit plugin?Gerrit recently switched to using Google's FLogger frontend for logging.FLogger still doesn't support log4j2 backend: [1]. Someone would haveto add it first, before we can perform that switch in Gerrit.On Mon, Sep 24, 2018 at 1:35 PM Gustaf Lundh <gustaf...@axis.com> wrote:Hi,Name:Gerrit Log Level Plug-inSuggested repo:plugins/log-levelDescription:Allows an administrator to persist configured log levels between restarts.I agree, the plugin wold be very useful.Any strong objections in creating the repo?No objections.Otherwise I'll just do it, and thnaks Gustaf for contributing your plugin.
Creating the repository as we speak :-)
On 24 Sep 2018, at 14:40, Gustaf Lundh <gustaf...@axis.com> wrote:Creating the repository as we speak :-)Awesome. Thanks.
On 26 Sep 2018, at 10:00, Gustaf Lundh <gustaf...@axis.com> wrote:Thanks. Pushed the code yesterday.This is how the config works:---$ cat log-level.config[FATAL]name = com.google.gerrit.server.change.EmailReviewComments[WARN]name = org.eclipse.jetty.server.sessionname = com.google.gerrit.server.plugins---It's just a few lines of code, but works great for us. Hope someone else finds it useful.
/Gustaf
On Monday, September 24, 2018 at 3:42:20 PM UTC+2, lucamilanesio wrote:Done:You are the Owner of the repo.Luca.
[WARN]name = org.eclipse.jetty.server.sessionname = com.google.gerrit.server.plugins
if we would use the standard log4j format. The boilerplate "name =" would be eliminated.org.eclipse.jetty.server.session=WARNcom.google.gerrit.server.plugins=WARN
To unsubscribe, email repo-disc...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I fully agree.The reason for the "name=" format is that I wanted to make use of configFactory.getGlobalPluginConfig() to manage the plugin config and dots, as you know, cannot be used in config key names.Escaping all the dots looked even worse than what we have now.But if you think using a property file instead and scrapping configFactory all together is worth it,
I would have no problems accepting a change like that.
Hi Gustav,What is the advantage of this plugin over adding:container.javaOptions = -Dlog4j.configuration=file:///etc/log4j.propertiesto gerrit.config?
Regards,Jacek
On Monday, 24 September 2018 13:35:10 UTC+2, Gustaf Lundh wrote:Hi,Name:Gerrit Log Level Plug-inSuggested repo:plugins/log-levelDescription:Allows an administrator to persist configured log levels between restarts.Typical configuration:$ cat log-level.config[log-levels "FATAL"]name = com.google.gerrit.server.change.EmailReviewComments[log-levels "ERROR"]name = com.google.gerrit.sshd.GerritServerSessionname = org.apache.mina.core.service.IoProcessor[log-levels "INFO"]name = com.google.gerrit.common.Version/Gustaf
--
I could see the difference if it was storing it refs/meta/config of All-Projects so that one wouldn't have to login to server.Or better if one could use it instead of SSH command (so that it is stored and applied in the same time :D)
but AFAICT it requires file to be modified and it reads it upon Gerrit start...
--
On Thu, Sep 27, 2018 at 8:03 AM Jacek Centkowski <geminica...@gmail.com> wrote:I could see the difference if it was storing it refs/meta/config of All-Projects so that one wouldn't have to login to server.Or better if one could use it instead of SSH command (so that it is stored and applied in the same time :D)Yes, that would be a nice feature of the plugin.
On 27 Sep 2018, at 08:33, Gustaf Lundh <gustaf...@axis.com> wrote:We want to keep the logs exactly as Gerrit sets them up in the code. (And there is a lot of setup being done).I.e. we want gc, error, access and sshd logs to be formatted and managed exactly as intended. By using a log4j.properties we need to emulate all that setup being done in code, for all these logs, and we need to keep track of log related changes in the Gerrit code base and keep our properties file in sync.
On Thu, Sep 27, 2018 at 9:09 AM Saša Živkov <ziv...@gmail.com> wrote:On Thu, Sep 27, 2018 at 8:03 AM Jacek Centkowski <geminica...@gmail.com> wrote:I could see the difference if it was storing it refs/meta/config of All-Projects so that one wouldn't have to login to server.Or better if one could use it instead of SSH command (so that it is stored and applied in the same time :D)Yes, that would be a nice feature of the plugin.Just to be more clear: here I meant to have an SSH command which stores and applies a log-level change.
On 27 Sep 2018, at 09:18, Gustaf Lundh <gustaf...@axis.com> wrote:
We do build some stats from the logs. Mostly user related. Otherwise we gather data from the metrics framework.Though the audit-sl4j plugin looks interesting. Is there any documentation?
I hate that we don't have a good way to explore or find new interesting plugins.
Am Montag, 24. September 2018 14:27:42 UTC+2 schrieb zivkov:I recently found out that log4j 2.x version actually supports automatic reconfiguration at runtime [1], see the monitorInterval setting.Maybe it is worth exploring switching to log4j 2.x instead of creating a Gerrit plugin?Gerrit recently switched to using Google's FLogger frontend for logging.FLogger still doesn't support log4j2 backend: [1]. Someone would haveto add it first, before we can perform that switch in Gerrit.
On Thu, Sep 27, 2018 at 5:07 PM Saša Živkov <ziv...@gmail.com> wrote:On Thu, Sep 27, 2018 at 9:09 AM Saša Živkov <ziv...@gmail.com> wrote:On Thu, Sep 27, 2018 at 8:03 AM Jacek Centkowski <geminica...@gmail.com> wrote:I could see the difference if it was storing it refs/meta/config of All-Projects so that one wouldn't have to login to server.Or better if one could use it instead of SSH command (so that it is stored and applied in the same time :D)Yes, that would be a nice feature of the plugin.Just to be more clear: here I meant to have an SSH command which stores and applies a log-level change.There is already a core ssh command to set logging level.
Would it make more sense to extend that to allow persisting the level changes?