Hi,
I'm trying to use a custom ConfigurationFactory. I created and annotated it
with a @Plugin and an @Order like this:
@Plugin(category = "ConfigurationFactory", name =
"StartupConfigurationFactory")
@Order(10)
public class StartupConfigurationFactory extends ConfigurationFactory{
...
}
But it
fig file. So a
> configuration factory cannot be a plugin.
>
> Best regards,
> Remko
>
> Sent from my iPhone
>
> > On 2014/08/01, at 10:18, Clément Guillaume
> wrote:
> >
> > Hi,
> >
> > I'm trying to use a custom ConfigurationFactory.
efault ConfigurationFactory.
>
>
> On 31 July 2014 21:34, Clément Guillaume wrote:
>
> > Oh ! I did this because of the documentation available here:
> >
> >
> http://logging.apache.org/log4j/2.x/manual/extending.html#ConfigurationFactory
> >
> > The second method
ctory would have to handle XML, JSON and
> YAML configurations.
> >
> > I would suggest having getSupportedTypes return something like “.cfg”
> and then having your configuration files end with .cfg.
> >
> > Ralph
> >
> > On Jul 31, 2014, at 6:18 PM, Clément Guillaum
ges attribute in configuration (and the corresponding
> PluginManager.addPackage method) does not work in 2.0.
>
> This has been fixed in trunk and the fix will be in the upcoming 2.0.1
> release.
> Can you try with trunk?
>
>
> On Sat, Aug 2, 2014 at 2:05 AM, Clément Guillaume
>
ee if your
> application is having a Log4j2Plugins.dat file being generated and included
> in your jar.
>
> Sent from my iPad
>
> > On Aug 1, 2014, at 1:06 PM, Clément Guillaume
> wrote:
> >
> > PluginManager.addPackage(“com.myorg.mypackage”) works with trunk
Hi,
I'm also using some custom plugins and several project and wars. I just
succeeded to setup a maven build that generate the Log4j2Plugins.dat.
First I enable the annotation processor on the project that content my
plugins:
org.bsc.maven
maven-processor-plugin
2.2.1
process
process
proces
Hi,
I would love to have a direct access to the target of a ConsoleAppender (as
I can directly get the fileName of a FileAppender). Do you plan to
implement this feature ? (and also for others properties like
ConsoleAppender.isFollow or FileAppender.immediateFlush, ...)
I also would love to be a
d instead.
>
>
> On 25 August 2014 14:22, Clément Guillaume wrote:
>
> > Hi,
> >
> > I would love to have a direct access to the target of a ConsoleAppender
> (as
> > I can directly get the fileName of a FileAppender). Do you plan to
>
rs need fields to remain
> immutable for performance or safety reasons, so creating a new Appender on
> reconfigure is generally the safer option.
>
>
> On 26 August 2014 02:43, Clément Guillaume wrote:
>
> > Yes, I know that.
> > So if I have 10 LoggerConfigs that u
Is it possible to print the LoggerContext name in the output?
Clément
og4j/2.x/manual/extending.html#Lookups) and
> include it in your PatternLayout's pattern.
>
> Sent from my iPhone
>
> > On 2015/07/18, at 9:39, Gary Gregory wrote:
> >
> > Hm... I do not think so. Patches welcome of course. What are your
> > expectations for suc
Yes, I trying to print the servletContext.servletContextName using the
WebLookup (${web:servletContextName}). But it doesn't work for now.
On Sat, Jul 18, 2015 at 8:26 PM, Gary Gregory
wrote:
> So you are using servletContextName?
>
> Gary
>
> On Sat, Jul 18, 2015 at 8:19 P
log4j/2.x/manual/webapp.html ?
>
> Gary
>
> On Sat, Jul 18, 2015 at 8:30 PM, Clément Guillaume >
> wrote:
>
> > Yes, I trying to print the servletContext.servletContextName using the
> > WebLookup (${web:servletContextName}). But it doesn't work for now.
> >
Hi,
I have a unit test, using log4j 2.8 to log to a file using a FileAppender,
that deletes the log file at the end of the test. This test works well on
linux, but fails on Windows because the java process still has a file
handle to the log file, and so the file cannot be deleted.
Any idea how to
It doesn't help, when DeleteOnExitHook is called the file handle is still
there
On Tue, Jan 31, 2017 at 10:26 AM, Remko Popma wrote:
> You can try calling File.deleteOnExit().
>
> On Wed, Feb 1, 2017 at 3:17 AM, Clément Guillaume
> wrote:
>
> > Hi,
> >
> &g
hristopher Schultz <
ch...@christopherschultz.net> wrote:
> Clément,
>
> On 1/31/17 1:17 PM, Clément Guillaume wrote:
> > I have a unit test, using log4j 2.8 to log to a file using a
> FileAppender,
> > that deletes the log file at the end of the test. This test works
Found it. I'm able to delete the file after calling LoggerContext.stop().
Is there a recommended practice between calling
Configurator.shutdown(LoggerContext)
or LoggerContext.stop()?
On Tue, Jan 31, 2017 at 1:51 PM, Clément Guillaume
wrote:
> I looked at the unit tests. I'm usi
Hi,
I wonder if it would be possible to programmatically configure jul to route
to log4j2.
It would be useful in case where system properties can not be used to set
the LogManager or the log4j-jul jar cannot be in the classpath at bootstrap.
jul to log4j2 bridge allow a similar configuration:
htt
This was not working because my web.xml was setting absolute-ordering and
so the Log4jServletContainerInitializer was never called.
On Tue, Jul 21, 2015 at 11:07 AM, Clément Guillaume
wrote:
> Yes, I have the log4j-web jar in my classpath, I'm in a servlet 3.0
> environment so I don
Hi,
I'm using slf4j (1.7.25) and log4j (2.13.3).
My config is simple, just a console appender.
I'm trying to log the toString of an Exception with a parameterized message.
It works fine when there is more than one parameter, but when it's a single
one, the whole exception stacktrace is printed.
o
think logger.warn("{} ", new Exception("my message")); will call
> warn(java.lang.String,java.lang.Throwable)
> <
> http://www.slf4j.org/apidocs/org/slf4j/Logger.html#warn(java.lang.String,java.lang.Throwable
> >
> ).
>
>
> On Thu, Oct 8, 2020 at 7:4
Hello,
I'm trying to make a log pattern showing the servlet context name or, if
missing, showing the process id.
${web:servletContextName} %msg
works well for servlet context name alone.
%pid %msg
works well for process id alone.
${web:servletContextName:-${sys:user.name}} %msg
works well for s
b:servletContextName}}{}{%pid}*. Would you mind checking,
> please?
>
> Kind regards.
>
> On Thu, Mar 25, 2021 at 2:32 AM Clément Guillaume
> wrote:
>
> > Hello,
> >
> > I'm trying to make a log pattern showing the servlet context name or, if
> > missi
24 matches
Mail list logo