20 | From: Eirik_Lygre/evita/no%EVITA@evita.no
21 | Subject: Re: Suggestion for new appender "DailyFileAppender"
22 | Date: Thu, 18 Jan 2001 20:18:27 +0100
23 | X-MIMETrack: Serialize by Router on domino1/evita/no(Release 5.0.5 |September 22, 2000) at
24 | 18.01.2001 20:18:30
25 |
26 |
27 |
28 | This version subclasses GregorianCalendar, to get access to the
29 | millis-variable used in the Calendar-classes (it is protected).
30 |
31 |
32 | What do you think?
33 |
34 |
35 | Eirik
36 |
37 |
38 | ++++++++++
39 | Eirik Lygre
40 | eirik.lygre@evita.no
41 | e-vita as, Stortorvet 3, Oslo
42 | Mobil: (+47) 905 66476
43 | Fax: (+47) 23 35 70 51
44 | DailyFileAppender1.jav
--------------------------------------------------------------------------------
/contribs/Jamie Tsao/mail-2001-06-20:
--------------------------------------------------------------------------------
1 | Licensed to the Apache Software Foundation (ASF) under one or more
2 | contributor license agreements. See the NOTICE file distributed with
3 | this work for additional information regarding copyright ownership.
4 | The ASF licenses this file to You under the Apache License, Version 2.0
5 | (the "License"); you may not use this file except in compliance with
6 | the License. You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 |
17 |
18 | Hi,
19 |
20 | I have written a JMSQueueAppender that essentially logs to a JMS Queue
21 | (Point 2 Point). The JMSAppender currently packaged with log4j logs to
22 | a JMS Topic (I would rename it JMSTopicAppender). I also made it so
23 | that the InitialContextFactory and ProviderUrl are configurable appender
24 | options. I would like to submit this to Apache.
25 |
26 | Thanks,
27 |
28 | Jamie Tsao
--------------------------------------------------------------------------------
/contribs/JimMoore/mail-2001-03-12T1454:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/contribs/JimMoore/mail-2001-03-12T1454
--------------------------------------------------------------------------------
/contribs/JimMoore/mail-2001-03-13T0646:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/contribs/JimMoore/mail-2001-03-13T0646
--------------------------------------------------------------------------------
/contribs/ThomasFenner/JDBCConnectionHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.klopotek.utils.log;
19 |
20 | import java.sql.*;
21 |
22 |
23 | /**
24 | This interface has to be implemented for your own database-connection-handling and its used in class JDBCLogger.
25 |
26 | Author : Thomas Fenner
27 |
28 | @since 1.0
29 | */
30 | public interface JDBCConnectionHandler
31 | {
32 | /**Get a connection*/
33 | Connection getConnection();
34 | /**Get a defined connection*/
35 | Connection getConnection(String _url, String _username, String _password);
36 | }
37 |
38 |
39 |
--------------------------------------------------------------------------------
/contribs/ThomasFenner/JDBCIDHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.klopotek.utils.log;
19 |
20 |
21 | /**
22 | This interface has to be implemented to provide ID-columns with unique IDs and its used in class JDBCLogger.
23 |
24 | Author : Thomas Fenner
25 |
26 | @since 1.0
27 | */
28 | public interface JDBCIDHandler
29 | {
30 | /**Get a unique ID*/
31 | Object getID();
32 | }
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/examples/NumberCruncher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package examples;
19 |
20 | import java.rmi.Remote;
21 | import java.rmi.RemoteException;
22 |
23 | /**
24 | NumberCruncher's factor positive integers. See source code for more details.
26 |
27 | @author Ceki Gülcü
28 |
29 | */
30 | public interface NumberCruncher extends Remote {
31 |
32 | /**
33 | Factor a positive integer number
and return its
34 | distinct factor's as an integer array.
35 | */
36 | int[] factor(int number) throws RemoteException;
37 | }
38 |
--------------------------------------------------------------------------------
/examples/lf5/InitUsingXMLPropertiesFile/example.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/examples/lf5/index.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 | See Examples
25 | section in the LogFactor5 user guide.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/examples/mycat.bad:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | # The usual stuff. Note that A1 is configured in root not in "some.cat"
17 | log4j.rootLogger=DEBUG, A1
18 | log4j.appender.A1=org.apache.log4j.ConsoleAppender
19 |
20 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.A1.layout.ConversionPattern=%5p [%t] %c - %m%n
22 |
23 | # Set the priority of "some.cat" to TRACE (defined in
24 | # examples.customLevel.XLevel). This will actually have the side
25 | # effect of instanciating a logger object having the name "some.cat"
26 | # this will cause a ClassCastException if the logger object is cast
27 | # as a MyLogger object.
28 |
29 | log4j.logger.some.cat=TRACE#examples.customLevel.XLevel
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/subclass/MyLoggerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package examples.subclass;
19 |
20 | import org.apache.log4j.Logger;
21 | import org.apache.log4j.spi.LoggerFactory;
22 |
23 | /**
24 | A factory that makes new {@link MyLogger} objects.
25 |
26 | See source
27 | code for more details.
28 |
29 | @author Ceki Gülcü */
30 | public class MyLoggerFactory implements LoggerFactory {
31 |
32 | /**
33 | The constructor should be public as it will be called by
34 | configurators in different packages. */
35 | public
36 | MyLoggerFactory() {
37 | }
38 |
39 | public
40 | Logger makeNewLoggerInstance(String name) {
41 | return new MyLogger(name);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/DefaultCategoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j;
19 |
20 | import org.apache.log4j.spi.LoggerFactory;
21 |
22 | class DefaultCategoryFactory implements LoggerFactory {
23 |
24 | DefaultCategoryFactory() {
25 | }
26 |
27 | public Logger makeNewLoggerInstance(String name) {
28 | return new Logger(name);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/ProvisionNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j;
19 |
20 | import java.util.Vector;
21 |
22 | class ProvisionNode extends Vector {
23 | private static final long serialVersionUID = -4479121426311014469L;
24 |
25 | ProvisionNode(Logger logger) {
26 | super();
27 | this.addElement(logger);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/chainsaw/doc-files/screen_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/main/java/org/apache/log4j/chainsaw/doc-files/screen_01.png
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/config/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | Package used in getting/setting component properties.
22 |
23 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/helpers/ThreadLocalMap.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.helpers;
19 |
20 | import java.util.Hashtable;
21 |
22 | /**
23 | * ThreadLocalMap
extends {@link InheritableThreadLocal} to
24 | * bequeath a copy of the hashtable of the MDC of the parent thread.
25 | *
26 | * @author Ceki Gülcü
27 | * @since 1.2
28 | */
29 | final public class ThreadLocalMap extends InheritableThreadLocal {
30 |
31 | public final Object childValue(Object parentValue) {
32 | Hashtable ht = (Hashtable) parentValue;
33 | if (ht != null) {
34 | return ht.clone();
35 | } else {
36 | return null;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/helpers/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | This package is used internally.
27 |
28 |
29 |
30 |
31 |
32 | Last modified: Sat Jul 3 15:12:58 MDT 1999
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/net/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 | Package for remote logging.
25 |
26 |
27 |
28 |
29 | Last modified: Tue Mar 21 20:28:14 MET 2000
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/or/DefaultRenderer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.or;
19 |
20 | /**
21 | * The default Renderer renders objects by calling their toString
method.
22 | *
23 | * @author Ceki Gülcü
24 | * @since 1.0
25 | */
26 | class DefaultRenderer implements ObjectRenderer {
27 |
28 | DefaultRenderer() {
29 | }
30 |
31 | /**
32 | * Render the object passed as parameter by calling its toString
method.
33 | */
34 | public String doRender(final Object o) {
35 | try {
36 | return o.toString();
37 | } catch (Exception ex) {
38 | return ex.toString();
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/or/ObjectRenderer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.or;
19 |
20 | /**
21 | * Implement this interface in order to render objects as strings.
22 | *
23 | * @author Ceki Gülcü
24 | * @since 1.0
25 | */
26 | public interface ObjectRenderer {
27 |
28 | /**
29 | * Render the object passed as parameter as a String.
30 | */
31 | public String doRender(Object o);
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/or/jms/package.html:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 | This package contains the MessageRenderer which renders objects of
22 | type javax.jms.Message
.
23 |
24 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/or/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | org.apache.log4j.or package
22 |
23 |
24 |
25 |
26 | ObjectRenders are resposible for rendering messages depending on
27 | their class type.
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/or/sax/package.html:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 | This package contains the AttributesRenderer which renders object of
22 | class org.xml.sax.Attributes
.
23 |
24 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | The main log4j package.
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/pattern/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Provides classes implementing format specifiers in conversion patterns.
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/DefaultRepositorySelector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.spi;
19 |
20 | public class DefaultRepositorySelector implements RepositorySelector {
21 |
22 | final LoggerRepository repository;
23 |
24 | public DefaultRepositorySelector(LoggerRepository repository) {
25 | this.repository = repository;
26 | }
27 |
28 | public LoggerRepository getLoggerRepository() {
29 | return repository;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/ErrorCode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.spi;
19 |
20 | /**
21 | * This interface defines commonly encoutered error codes.
22 | *
23 | * @author Ceki Gülcü
24 | * @since 0.9.0
25 | */
26 | public interface ErrorCode {
27 |
28 | public final int GENERIC_FAILURE = 0;
29 | public final int WRITE_FAILURE = 1;
30 | public final int FLUSH_FAILURE = 2;
31 | public final int CLOSE_FAILURE = 3;
32 | public final int FILE_OPEN_FAILURE = 4;
33 | public final int MISSING_LAYOUT = 5;
34 | public final int ADDRESS_PARSE_FAILURE = 6;
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/HierarchyEventListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.spi;
19 |
20 | import org.apache.log4j.Appender;
21 | import org.apache.log4j.Category;
22 |
23 | /**
24 | * Listen to events occuring within a {@link org.apache.log4j.Hierarchy Hierarchy}.
25 | *
26 | * @author Ceki Gülcü
27 | * @since 1.2
28 | */
29 | public interface HierarchyEventListener {
30 |
31 | // public
32 | // void categoryCreationEvent(Category cat);
33 |
34 | public void addAppenderEvent(Category cat, Appender appender);
35 |
36 | public void removeAppenderEvent(Category cat, Appender appender);
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/LoggerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.spi;
19 |
20 | import org.apache.log4j.Logger;
21 |
22 | /**
23 | * Implement this interface to create new instances of Logger or a sub-class of Logger.
24 | *
25 | *
26 | * See examples/subclass/MyLogger.java
for an example.
27 | *
28 | * @author Ceki Gülcü
29 | * @since version 0.8.5
30 | */
31 | public interface LoggerFactory {
32 |
33 | public Logger makeNewLoggerInstance(String name);
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/NullWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.log4j.spi;
18 |
19 | import java.io.Writer;
20 |
21 | /**
22 | * NullWriter is an obsolete class provided only for binary compatibility with earlier versions of log4j and should not
23 | * be used.
24 | *
25 | * @deprecated
26 | */
27 | class NullWriter extends Writer {
28 |
29 | public void close() {
30 | // blank
31 | }
32 |
33 | public void flush() {
34 | // blank
35 | }
36 |
37 | public void write(char[] cbuf, int off, int len) {
38 | // blank
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/RendererSupport.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.spi;
19 |
20 | import org.apache.log4j.or.ObjectRenderer;
21 | import org.apache.log4j.or.RendererMap;
22 |
23 | public interface RendererSupport {
24 |
25 | public RendererMap getRendererMap();
26 |
27 | public void setRenderer(Class renderedClass, ObjectRenderer renderer);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/ThrowableRenderer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.log4j.spi;
18 |
19 | /**
20 | * Implemented by classes that render instances of java.lang.Throwable (exceptions and errors) into a string
21 | * representation.
22 | *
23 | * @since 1.2.16
24 | */
25 | public interface ThrowableRenderer {
26 | /**
27 | * Render Throwable.
28 | *
29 | * @param t throwable, may not be null.
30 | * @return String representation.
31 | */
32 | public String[] doRender(Throwable t);
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/ThrowableRendererSupport.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.log4j.spi;
18 |
19 | /**
20 | * Implemented by logger repositories that support configurable rendering of Throwables.
21 | *
22 | * @since 1.2.16
23 | */
24 | public interface ThrowableRendererSupport {
25 | /**
26 | * Get throwable renderer.
27 | *
28 | * @return throwable renderer, may be null.
29 | */
30 | ThrowableRenderer getThrowableRenderer();
31 |
32 | /**
33 | * Set throwable renderer.
34 | *
35 | * @param renderer renderer, may be null.
36 | */
37 | void setThrowableRenderer(ThrowableRenderer renderer);
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/spi/package.html:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Contains part of the System Programming Interface (SPI) needed to
25 | extend log4j.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/varia/InterruptUtil.java:
--------------------------------------------------------------------------------
1 | package org.apache.log4j.varia;
2 |
3 | import org.apache.log4j.helpers.LogLog;
4 |
5 | public class InterruptUtil {
6 | final boolean previouslyInterrupted;
7 |
8 | public InterruptUtil() {
9 | super();
10 | previouslyInterrupted = Thread.currentThread().isInterrupted();
11 | }
12 |
13 | public void maskInterruptFlag() {
14 | if (previouslyInterrupted) {
15 | Thread.interrupted();
16 | }
17 | }
18 |
19 | public void unmaskInterruptFlag() {
20 | if (previouslyInterrupted) {
21 | try {
22 | Thread.currentThread().interrupt();
23 | } catch (SecurityException se) {
24 | LogLog.error("Failed to interrupt current thread", se);
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/varia/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 | Contains various appenders, filters and other odds and ends.
25 |
26 |
27 |
28 |
29 | Last modified: Tue Mar 21 20:28:14 MET 2000
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/log4j/xml/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | XML based components.
27 |
28 |
29 |
30 |
31 |
32 | Last modified: Mon Mar 27 21:17:13 MDT 2000
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/NOTICE:
--------------------------------------------------------------------------------
1 | Apache log4j
2 | Copyright 2007 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
--------------------------------------------------------------------------------
/src/performance/java/org/apache/log4j/performance/package.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Package to measure the performance of the different log4j
26 | components.
27 |
28 |
29 | The
30 | org.apache.log4j.performance
package is intended
31 | for internal use only. Consequently, the classes in this
32 | package are not included in the log4j.jar file.
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/performance/java/org/apache/log4j/performance/xml/logging100.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/performance/java/org/apache/log4j/performance/xml/logging1000.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/performance/java/org/apache/log4j/performance/xml/logging4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/src/site/apt/roadmap.apt:
--------------------------------------------------------------------------------
1 | ~~ Licensed to the Apache Software Foundation (ASF) under one or more
2 | ~~ contributor license agreements. See the NOTICE file distributed with
3 | ~~ this work for additional information regarding copyright ownership.
4 | ~~ The ASF licenses this file to You under the Apache License, Version 2.0
5 | ~~ (the "License"); you may not use this file except in compliance with
6 | ~~ the License. You may obtain a copy of the License at
7 | ~~
8 | ~~ http://www.apache.org/licenses/LICENSE-2.0
9 | ~~
10 | ~~ Unless required by applicable law or agreed to in writing, software
11 | ~~ distributed under the License is distributed on an "AS IS" BASIS,
12 | ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ~~ See the License for the specific language governing permissions and
14 | ~~ limitations under the License.
15 |
16 | Apache log4j 1.2 Roadmap
17 |
18 | Apache log4j 1.2 is mature and widely deployed. Significant
19 | changes are unlikely. Bug fixes and maintenance releases are anticipated.
20 |
21 | The next major version with is {{{http://logging.apache.org/log4j/2.0/index.html}Apache log4j 2}}
22 |
23 |
--------------------------------------------------------------------------------
/src/site/resources/css/site.css:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one or more
3 | contributor license agreements. See the NOTICE file distributed with
4 | this work for additional information regarding copyright ownership.
5 | The ASF licenses this file to You under the Apache License, Version 2.0
6 | (the "License"); you may not use this file except in compliance with
7 | the License. You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 |
17 | */
18 |
--------------------------------------------------------------------------------
/src/site/resources/images/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/site/resources/images/logo.jpg
--------------------------------------------------------------------------------
/src/site/resources/images/ls-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/site/resources/images/ls-logo.jpg
--------------------------------------------------------------------------------
/src/site/resources/images/maven-feather.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/site/resources/images/maven-feather.png
--------------------------------------------------------------------------------
/src/site/resources/images/od.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/site/resources/images/od.gif
--------------------------------------------------------------------------------
/src/test/input/RFA1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.RollingFileAppender
17 | log4j.appender.testAppender.file=target/test-output/RFA-test1.log
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%m\n
21 | log4j.appender.testAppender.maxFileSize=100
22 |
23 | # Prevent internal log4j DEBUG messages from polluting the output.
24 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
25 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
26 | log4j.logger.org.apache.log4j.FileAppender=INFO
27 |
--------------------------------------------------------------------------------
/src/test/input/defaultInit3.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=DEBUG, D3
17 | log4j.appender.D3=org.apache.log4j.FileAppender
18 | log4j.appender.D3.File=output/temp
19 | log4j.appender.D3.Append=false
20 | log4j.appender.D3.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.D3.layout.ConversionPattern=%d [%t] %-5p %.16c - %m%n
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=OFF
17 | log4j.rootLogger=,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold1.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=FATAL
17 | log4j.rootLogger=,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold2.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold3.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=ERROR
17 | log4j.rootLogger=,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold3.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold4.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=WARN
17 | log4j.rootLogger=,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold4.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold5.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=INFO
17 | log4j.rootLogger=,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold5.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold6.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=DEBUG
17 | log4j.rootLogger=,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold6.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold7.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=TRACE#org.apache.log4j.xml.XLevel
17 | log4j.rootLogger=ALL,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold7.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
23 |
--------------------------------------------------------------------------------
/src/test/input/hierarchyThreshold8.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.threshold=ALL
17 | log4j.rootLogger=ALL,A
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.File=target/test-output/hierarchyThreshold8.log
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%p [%t] %c{2} = %m%n
--------------------------------------------------------------------------------
/src/test/input/jdbc_h2_bufferSize1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.debug=true
16 | log4j.threshold=ALL
17 | log4j.rootLogger=ALL,A
18 | log4j.appender.A=org.apache.log4j.jdbc.JDBCAppender
19 | log4j.appender.A.URL=jdbc:h2:mem:test_db
20 | log4j.appender.A.driver=org.h2.Driver
21 | log4j.appender.A.bufferSize=1
22 | log4j.appender.A.user=
23 | log4j.appender.A.password=
24 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
25 | log4j.appender.A.sql=insert into logs(level,location,message,message2) values('%p','%c','%m', ' %c %p %m')
26 |
--------------------------------------------------------------------------------
/src/test/input/jdbc_h2_bufferSize2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.debug=true
16 | log4j.threshold=ALL
17 | log4j.rootLogger=ALL,A
18 | log4j.appender.A=org.apache.log4j.jdbc.JDBCAppender
19 | log4j.appender.A.URL=jdbc:h2:mem:test_db
20 | log4j.appender.A.driver=org.h2.Driver
21 | log4j.appender.A.bufferSize=2
22 | log4j.appender.A.user=
23 | log4j.appender.A.password=
24 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
25 | log4j.appender.A.sql=insert into logs(level,location,message,message2) values('%p','%c','%m', ' %c %p %m')
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout.mdc.1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%-5p - %m %X%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%-5p - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout10.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append= false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %l: %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout11.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%-5p [%t] %c{2}: %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout12.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %C.%M(%F:%L): %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout13.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %C{3}.%M(%F:%L): %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout14.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%-5p [%t] %c{1.}: %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout15.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=TRACE, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedMyPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%5p %-4# - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
27 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout16.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/enhancedPattern.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}{GMT}Z %d{yyyy-MM-dd HH:mm:ss}{GMT-6}-0600 - %m%n
22 |
23 | # Prevent internal log4j DEBUG messages from polluting the output.
24 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
25 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
26 | log4j.logger.org.apache.log4j.FileAppender=INFO
27 |
28 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append= false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %.16c - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout3.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %.16c - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout4.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%d{DATE} [%t] %-5p %.16c - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout5.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %-5p %.16c - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout6.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%d{ABSOLUTE} [%t] %-5p %.16c - %m%n
21 |
22 |
23 | # Prevent internal log4j DEBUG messages from polluting the output.
24 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
25 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
26 | log4j.logger.org.apache.log4j.FileAppender=INFO
27 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout7.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %-5p %.16c - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout8.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%r [%t] %-5p %.16c - %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/pattern/enhancedPatternLayout9.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.file=target/test-output/enhancedPattern.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %.16c : %m%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/patternLayout.mdc.1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootCategory=DEBUG, testAppender
16 | log4j.appender.testAppender=org.apache.log4j.FileAppender
17 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
18 | log4j.appender.testAppender.Append=false
19 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
20 | log4j.appender.testAppender.layout.ConversionPattern=%-5p - %m %X%n
21 |
22 | # Prevent internal log4j DEBUG messages from polluting the output.
23 | log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
24 | log4j.logger.org.apache.log4j.config.PropertySetter=INFO
25 | log4j.logger.org.apache.log4j.FileAppender=INFO
26 |
--------------------------------------------------------------------------------
/src/test/input/patternLayout1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%-5p - %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout10.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append= false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %l: %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout11.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%-5p [%t] %c{2}: %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout12.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %C.%M(%F:%L): %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout13.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %C{3}.%M(%F:%L): %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout14.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File= target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.MyPatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%5p %-4# - %m%n
22 |
--------------------------------------------------------------------------------
/src/test/input/patternLayout2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append= false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %.16c - %m%n
22 |
--------------------------------------------------------------------------------
/src/test/input/patternLayout3.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %.16c - %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout4.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%d{DATE} [%t] %-5p %.16c - %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout5.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %-5p %.16c - %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout6.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%d{ABSOLUTE} [%t] %-5p %.16c - %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout7.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %-5p %.16c - %m%n
22 |
--------------------------------------------------------------------------------
/src/test/input/patternLayout8.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=%r [%t] %-5p %.16c - %m%n
--------------------------------------------------------------------------------
/src/test/input/patternLayout9.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | log4j.rootCategory=TRACE, testAppender
17 | log4j.appender.testAppender=org.apache.log4j.FileAppender
18 | log4j.appender.testAppender.File=target/test-output/patternLayoutTest.out
19 | log4j.appender.testAppender.Append=false
20 | log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
21 | log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %.16c : %m%n
--------------------------------------------------------------------------------
/src/test/input/socketServer1.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x [%t] %c %m%n
23 |
24 |
--------------------------------------------------------------------------------
/src/test/input/socketServer2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x [%t] %C (%F:%L) %m%n
23 |
24 |
--------------------------------------------------------------------------------
/src/test/input/socketServer3.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.Logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x [%t] %C (%F:%L) %m%n
23 |
--------------------------------------------------------------------------------
/src/test/input/socketServer4.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.Logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x %X{key1}%X{key4} [%t] %c{1} - %m%n
23 |
--------------------------------------------------------------------------------
/src/test/input/socketServer5.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.Logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x %X{key1}%X{key5} [%t] %c{1} - %m%n
23 |
--------------------------------------------------------------------------------
/src/test/input/socketServer6.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.Logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x %X{hostID} %X{key6} [%t] %c{1} - %m%n
23 |
--------------------------------------------------------------------------------
/src/test/input/socketServer7.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.Logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x %X{hostID} %X{key7} [%t] %c{1} - %m%n
23 |
--------------------------------------------------------------------------------
/src/test/input/socketServer8.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | log4j.rootLogger=TRACE, A
16 | log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
17 | log4j.Logger.org.apache.log4j.net.SocketNode=WARN
18 | log4j.appender.A=org.apache.log4j.FileAppender
19 | log4j.appender.A.file=target/test-output/socketServerTestCase.out
20 | log4j.appender.A.Append=false
21 | log4j.appender.A.layout=org.apache.log4j.PatternLayout
22 | log4j.appender.A.layout.ConversionPattern=%5p %x %X{hostID} %X{key8} [%t] %c{1} - %m%n
23 |
--------------------------------------------------------------------------------
/src/test/input/xml/DOMTest4_A1.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/test/input/xml/DOMTest4_A2.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/test/input/xml/customLevel1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/test/input/xml/defaultInit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/test/input/xml/newAsyncAppender0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/test/input/xml/newAsyncAppender1.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/test/input/xml/socketAppenderForChainsaw.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/test/input/xml/testReset.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/test/input/xml/throwableRenderer1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/BlockableVectorAppender.java:
--------------------------------------------------------------------------------
1 | package org.apache.log4j;
2 |
3 | import org.apache.log4j.spi.LoggingEvent;
4 |
5 | /**
6 | * Vector appender that can be explicitly blocked.
7 | */
8 | final class BlockableVectorAppender extends VectorAppender {
9 | /**
10 | * Monitor object used to block appender.
11 | */
12 | private final Object monitor = new Object();
13 |
14 | /**
15 | * Create new instance.
16 | */
17 | public BlockableVectorAppender() {
18 | super();
19 | }
20 |
21 | /**
22 | * {@inheritDoc}
23 | */
24 | public void append(final LoggingEvent event) {
25 | synchronized (monitor) {
26 | super.append(event);
27 | //
28 | // if fatal, echo messages for testLoggingInDispatcher
29 | //
30 | if (event.getLevel() == Level.FATAL) {
31 | Logger logger = Logger.getLogger(event.getLoggerName());
32 | logger.error(event.getMessage().toString());
33 | logger.warn(event.getMessage().toString());
34 | logger.info(event.getMessage().toString());
35 | logger.debug(event.getMessage().toString());
36 | }
37 | }
38 | }
39 |
40 | /**
41 | * Get monitor object.
42 | *
43 | * @return monitor.
44 | */
45 | public Object getMonitor() {
46 | return monitor;
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/Greeter.java:
--------------------------------------------------------------------------------
1 | package org.apache.log4j;
2 |
3 | /**
4 | * Logging request runnable.
5 | */
6 | final class Greeter implements Runnable {
7 | /**
8 | * Logger.
9 | */
10 | private final Logger logger;
11 |
12 | /**
13 | * Repetitions.
14 | */
15 | private final int repetitions;
16 |
17 | /**
18 | * Create new instance.
19 | *
20 | * @param logger logger, may not be null.
21 | * @param repetitions repetitions.
22 | */
23 | public Greeter(final Logger logger, final int repetitions) {
24 | if (logger == null) {
25 | throw new IllegalArgumentException("logger");
26 | }
27 |
28 | this.logger = logger;
29 | this.repetitions = repetitions;
30 | }
31 |
32 | /**
33 | * {@inheritDoc}
34 | */
35 | public void run() {
36 | try {
37 | for (int i = 0; i < repetitions; i++) {
38 | logger.info("Hello, World");
39 | Thread.sleep(1);
40 | }
41 | } catch (InterruptedException ex) {
42 | Thread.currentThread().interrupt();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/Last.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j;
19 |
20 | import junit.framework.TestCase;
21 | import junit.framework.TestSuite;
22 | import junit.framework.Test;
23 |
24 | public class Last extends TestCase {
25 |
26 | public Last(String name) {
27 | super(name);
28 | }
29 |
30 | public void test1() {
31 | }
32 |
33 | public static Test suite() {
34 | TestSuite suite = new TestSuite();
35 | suite.addTest(new Last("test1"));
36 | return suite;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/NullPointerAppender.java:
--------------------------------------------------------------------------------
1 | package org.apache.log4j;
2 |
3 | class NullPointerAppender extends AppenderSkeleton {
4 | public NullPointerAppender() {
5 | }
6 |
7 | /**
8 | * This method is called by the {@link org.apache.log4j.AppenderSkeleton#doAppend} method.
9 | */
10 | public void append(org.apache.log4j.spi.LoggingEvent event) {
11 | throw new NullPointerException();
12 | }
13 |
14 | public void close() {
15 | }
16 |
17 | public boolean requiresLayout() {
18 | return false;
19 | }
20 | }
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/TestConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j;
19 |
20 | public class TestConstants {
21 |
22 | public static final String TARGET_OUTPUT_PREFIX = "target/test-output/";
23 | public static final String TEST_SRC_PREFIX = "src/test/";
24 | public static final String TEST_WITNESS_PREFIX = TEST_SRC_PREFIX + "witness/";
25 | public static final String TEST_INPUT_PREFIX = TEST_SRC_PREFIX + "input/";
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/helpers/UtilLoggingLevelTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.helpers;
19 |
20 | import junit.framework.*;
21 |
22 | /**
23 | * Unit tests for UtilLoggingLevel.
24 | */
25 |
26 | public class UtilLoggingLevelTest extends TestCase {
27 |
28 | /**
29 | * Create new instance of test.
30 | *
31 | * @param testName test name
32 | */
33 | public UtilLoggingLevelTest(final String testName) {
34 | super(testName);
35 | }
36 |
37 | /**
38 | * Test toLevel("fiNeSt").
39 | */
40 | public void testToLevelFINEST() {
41 | assertSame(UtilLoggingLevel.FINEST, UtilLoggingLevel.toLevel("fiNeSt"));
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/helpers/VersionUtilTest.java:
--------------------------------------------------------------------------------
1 | package org.apache.log4j.helpers;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
6 |
7 | public class VersionUtilTest {
8 |
9 | @Test
10 | public void smoke() {
11 | assertEquals(4, VersionUtil.getJavaMajorVersion("1.4.xx"));
12 | assertEquals(5, VersionUtil.getJavaMajorVersion("1.5"));
13 | assertEquals(5, VersionUtil.getJavaMajorVersion("1.5.xx"));
14 | assertEquals(5, VersionUtil.getJavaMajorVersion("1.5AA"));
15 | assertEquals(7, VersionUtil.getJavaMajorVersion("1.7.0_80-b15"));
16 | assertEquals(8, VersionUtil.getJavaMajorVersion("1.8.0_311"));
17 | assertEquals(9, VersionUtil.getJavaMajorVersion("9EA"));
18 | assertEquals(9, VersionUtil.getJavaMajorVersion("9.0.1"));
19 | assertEquals(18, VersionUtil.getJavaMajorVersion("18.3+xx"));
20 | assertEquals(19, VersionUtil.getJavaMajorVersion("19"));
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/pattern/Num343PatternConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.pattern;
19 |
20 | import org.apache.log4j.spi.LoggingEvent;
21 |
22 | public class Num343PatternConverter extends LoggingEventPatternConverter {
23 |
24 | private Num343PatternConverter() {
25 | super("Num34", "num34");
26 | }
27 |
28 | private static final Num343PatternConverter INSTANCE = new Num343PatternConverter();
29 |
30 | public static PatternConverter newInstance(final String[] options) {
31 | return INSTANCE;
32 | }
33 |
34 | public void format(LoggingEvent event, StringBuffer toAppendTo) {
35 | toAppendTo.append("343");
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/testUtil/ExceptionCreator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 QOS.CH Sarl (Switzerland)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.log4j.testUtil;
17 |
18 | /**
19 | * Used to create exception for testing purposes.
20 | */
21 | public class ExceptionCreator {
22 |
23 | public static Exception create(String aMessage) {
24 | Exception e = new Exception(aMessage);
25 | return e;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/testUtil/RandomUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 QOS.CH Sarl (Switzerland)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.log4j.testUtil;
17 |
18 | import java.util.Random;
19 |
20 | public class RandomUtil {
21 |
22 | private static Random random = new Random();
23 |
24 | public static int getPositiveInt() {
25 | int r = random.nextInt();
26 | if (r < 0) {
27 | r = -r;
28 | }
29 | return r;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/testUtil/StringPrintStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 QOS.CH Sarl (Switzerland)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.log4j.testUtil;
17 |
18 | import java.io.PrintStream;
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | public class StringPrintStream extends PrintStream {
23 | public static final String LINE_SEP = System.getProperty("line.separator");
24 | PrintStream other;
25 | public List stringList = new ArrayList();
26 |
27 | public StringPrintStream(PrintStream ps) {
28 | super(ps);
29 | other = ps;
30 | }
31 |
32 | public void print(String s) {
33 | other.print(s);
34 | stringList.add(s);
35 | }
36 |
37 | public void println(String s) {
38 | other.println(s);
39 | stringList.add(s);
40 | }
41 |
42 | public void println(Object o) {
43 | other.println(o);
44 | stringList.add(o.toString());
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.util;
19 |
20 | import java.util.regex.Matcher;
21 | import java.util.regex.Pattern;
22 |
23 | public class AbsoluteDateAndTimeFilter implements Filter {
24 |
25 | Pattern pattern = Pattern.compile("(" + ABSOLUTE_DATE_AND_TIME_PAT + ")");
26 |
27 | public String filter(String in) {
28 | Matcher matcher = pattern.matcher(in);
29 | if (matcher.find()) {
30 | StringBuffer buf = new StringBuffer();
31 | matcher.appendReplacement(buf, "");
32 | matcher.appendTail(buf);
33 | return buf.toString();
34 | } else {
35 | return in;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/util/AbsoluteTimeFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.util;
19 |
20 | import java.util.regex.Matcher;
21 | import java.util.regex.Pattern;
22 |
23 | public class AbsoluteTimeFilter implements Filter {
24 |
25 | Pattern pattern = Pattern.compile("(" + ABSOLUTE_TIME_PAT + ")");
26 |
27 | public String filter(String in) {
28 | Matcher matcher = pattern.matcher(in);
29 | if (matcher.find()) {
30 | StringBuffer buf = new StringBuffer();
31 | matcher.appendReplacement(buf, "");
32 | matcher.appendTail(buf);
33 | return buf.toString();
34 | } else {
35 | return in;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/util/ISO8601Filter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.util;
19 |
20 | import java.util.regex.Matcher;
21 | import java.util.regex.Pattern;
22 |
23 | public class ISO8601Filter implements Filter {
24 |
25 | Pattern PATTERN = Pattern.compile("(" + ISO8601_PAT + ")");
26 |
27 | public String filter(String in) {
28 | Matcher matcher = PATTERN.matcher(in);
29 | if (matcher.find()) {
30 | StringBuffer buf = new StringBuffer();
31 | matcher.appendReplacement(buf, "");
32 | matcher.appendTail(buf);
33 | return buf.toString();
34 | } else {
35 | return in;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/util/Log4jAndNothingElseFilter.java:
--------------------------------------------------------------------------------
1 | package org.apache.log4j.util;
2 |
3 | import java.util.regex.Matcher;
4 | import java.util.regex.Pattern;
5 |
6 | public class Log4jAndNothingElseFilter implements Filter {
7 |
8 | public boolean containsMatch(String regex, String in) {
9 | Pattern p = Pattern.compile(regex);
10 | Matcher matcher = p.matcher(in);
11 | if (matcher.lookingAt()) {
12 | return true;
13 | }
14 |
15 | return false;
16 | }
17 |
18 | public String filter(String in) throws UnexpectedFormatException {
19 | if (in == null) {
20 | return null;
21 | }
22 |
23 | if (!containsMatch("\\sat\\s", in)) {
24 | return in;
25 | }
26 | if (containsMatch("\\sat\\sorg.apache.log4j", in)) {
27 | return in;
28 | } else {
29 | return null;
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/util/RelativeTimeFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.util;
19 |
20 | import java.util.regex.Matcher;
21 | import java.util.regex.Pattern;
22 |
23 | public class RelativeTimeFilter implements Filter {
24 |
25 | Pattern pattern = Pattern.compile("(" + RELATIVE_TIME_PAT + ")");
26 |
27 | public String filter(String in) {
28 | Matcher matcher = pattern.matcher(in);
29 | if (matcher.find()) {
30 | StringBuffer buf = new StringBuffer();
31 | matcher.appendReplacement(buf, "");
32 | matcher.appendTail(buf);
33 | return buf.toString();
34 | } else {
35 | return in;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/util/UnexpectedFormatException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.util;
19 |
20 | public class UnexpectedFormatException extends Exception {
21 | private static final long serialVersionUID = 1787725660780924147L;
22 |
23 | public UnexpectedFormatException(String msg) {
24 | super(msg);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/log4j/util/XMLTimestampFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.log4j.util;
19 |
20 | import java.util.regex.Matcher;
21 | import java.util.regex.Pattern;
22 |
23 | public class XMLTimestampFilter implements Filter {
24 |
25 | Pattern pattern = Pattern.compile("(" + "timestamp=\"\\d{10,13}\"" + ")");
26 |
27 | public String filter(String in) {
28 | Matcher matcher = pattern.matcher(in);
29 | if (matcher.find()) {
30 | StringBuffer buf = new StringBuffer();
31 | matcher.appendReplacement(buf, "timestamp=\"XXX\"");
32 | matcher.appendTail(buf);
33 | return buf.toString();
34 | } else {
35 | return in;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/resources/L7D_en_US.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | test=This is the English, US test.
16 | hello_world=Hello world.
17 | msg1=This is test number {0} with string argument {1}.
18 |
--------------------------------------------------------------------------------
/src/test/resources/L7D_fr.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | test=Ceci est le test en francais pour la France.
16 | hello_world=Bonjour la France.
17 | msg1=Ceci est le test numero {0} contenant l''argument {1}.
18 |
--------------------------------------------------------------------------------
/src/test/resources/L7D_fr_CH.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | test=Ceci est le test en francais pour la p'tite Suisse.
16 | hello world=Salut le monde.
17 |
--------------------------------------------------------------------------------
/src/test/resources/TestLogSFPatterns.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | Iteration0=Iteration {}
18 | Hello1=Hello, World
19 | Malformed=Hello, {.
20 | Hello2=Hello, {}World
21 | Hello3=Hello, {}
22 | Hello4={}, {}.
23 | Hello5={}{} {}.
24 | Hello6={}{} {}{}
25 |
--------------------------------------------------------------------------------
/src/test/resources/org/apache/log4j/TestLogMFPatterns.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | Iteration0=Iteration {0}
18 | Hello1=Hello, World
19 | Malformed=Hello, {.
20 | Hello2=Hello, {0}World
21 | Hello3=Hello, {0}
22 | Hello4={1}, {0}.
23 | Hello5={1}{2} {0}.
24 | Hello6={1}{2} {0}{3}
25 |
--------------------------------------------------------------------------------
/src/test/resources/org/apache/log4j/TestLogSFPatterns.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | Iteration0=Iteration {}
18 | Hello1=Hello, World
19 | Malformed=Hello, {.
20 | Hello2=Hello, {}World
21 | Hello3=Hello, {}
22 | Hello4={}, {}.
23 | Hello5={}{} {}.
24 | Hello6={}{} {}{}
25 |
--------------------------------------------------------------------------------
/src/test/resources/org/apache/log4j/rewrite/map.log:
--------------------------------------------------------------------------------
1 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1: p2: Message 0
2 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1:Hello p2:World {p1=Hello, p2=World, x1=Mundo}
3 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1:Hello p2:World Message 1
4 |
--------------------------------------------------------------------------------
/src/test/resources/org/apache/log4j/rewrite/property.log:
--------------------------------------------------------------------------------
1 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1:Hello p2:World Message 0
2 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1:Hola p2:World Message 1
3 |
--------------------------------------------------------------------------------
/src/test/resources/org/apache/log4j/rewrite/reflection.log:
--------------------------------------------------------------------------------
1 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1: p2: Message 0
2 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1: p2:Hello I am bean.
3 | INFO org.apache.log4j.rewrite.RewriteAppenderTest - p1:Hola p2:Hello Welcome to The Hub
4 |
--------------------------------------------------------------------------------
/src/test/witness/LevelMatchFilter_accept:
--------------------------------------------------------------------------------
1 | TRACE - pass 0; filter set to accept only TRACE msgs
2 | DEBUG - pass 1; filter set to accept only DEBUG msgs
3 | INFO - pass 2; filter set to accept only INFO msgs
4 | WARN - pass 3; filter set to accept only WARN msgs
5 | ERROR - pass 4; filter set to accept only ERROR msgs
6 | FATAL - pass 5; filter set to accept only FATAL msgs
7 |
--------------------------------------------------------------------------------
/src/test/witness/PatternParser_mdc:
--------------------------------------------------------------------------------
1 | starting mdc pattern test
2 | empty mdc, no key specified in pattern : {}
3 | empty mdc, key1 in pattern :
4 | empty mdc, key2 in pattern :
5 | empty mdc, key3 in pattern :
6 | empty mdc, key1, key2, and key3 in pattern : ,,
7 | filled mdc, no key specified in pattern : {{key1,value1}{key2,value2}}
8 | filled mdc, key1 in pattern : value1
9 | filled mdc, key2 in pattern : value2
10 | filled mdc, key3 in pattern :
11 | filled mdc, key1, key2, and key3 in pattern : value1,value2,
12 | finished mdc pattern test
13 |
--------------------------------------------------------------------------------
/src/test/witness/customLevel.1:
--------------------------------------------------------------------------------
1 | DEBUG xml.CustomLevelTestCase - Message 1
2 | INFO xml.CustomLevelTestCase - Message 2
3 | WARN xml.CustomLevelTestCase - Message 3
4 | ERROR xml.CustomLevelTestCase - Message 4
5 | TRACE xml.CustomLevelTestCase - Message 5
6 |
--------------------------------------------------------------------------------
/src/test/witness/customLevel.2:
--------------------------------------------------------------------------------
1 | DEBUG xml.CustomLevelTestCase - Message 1
2 | INFO xml.CustomLevelTestCase - Message 2
3 | WARN xml.CustomLevelTestCase - Message 3
4 | ERROR xml.CustomLevelTestCase - Message 4
5 | TRACE xml.CustomLevelTestCase - Message 5
6 |
--------------------------------------------------------------------------------
/src/test/witness/customLevel.3:
--------------------------------------------------------------------------------
1 | TRACE xml.CustomLevelTestCase - Message 5
2 |
--------------------------------------------------------------------------------
/src/test/witness/customLevel.4:
--------------------------------------------------------------------------------
1 | DEBUG xml.CustomLevelTestCase - Message 1
2 | INFO xml.CustomLevelTestCase - Message 2
3 | WARN xml.CustomLevelTestCase - Message 3
4 | ERROR xml.CustomLevelTestCase - Message 4
5 | TRACE xml.CustomLevelTestCase - Message 5
6 |
--------------------------------------------------------------------------------
/src/test/witness/customLogger.1:
--------------------------------------------------------------------------------
1 | TRACE customLogger.XLoggerTestCase - Message 0
2 | DEBUG customLogger.XLoggerTestCase - Message 1
3 | WARN customLogger.XLoggerTestCase - Message 2
4 | ERROR customLogger.XLoggerTestCase - Message 3
5 | FATAL customLogger.XLoggerTestCase - Message 4
6 | DEBUG customLogger.XLoggerTestCase - Message 5
7 | java.lang.Exception: Just testing
8 | at org.apache.log4j.customLogger.XLoggerTestCase.common(XLoggerTestCase.java:XXX)
9 | at org.apache.log4j.customLogger.XLoggerTestCase.test1(XLoggerTestCase.java:XXX)
10 |
--------------------------------------------------------------------------------
/src/test/witness/customLogger.2:
--------------------------------------------------------------------------------
1 | TRACE customLogger.XLoggerTestCase - Message 0
2 |
--------------------------------------------------------------------------------
/src/test/witness/dom.A2.1:
--------------------------------------------------------------------------------
1 | [main] TRACE org.apache.log4j.xml.DOMTestCase - Message 0
2 | [main] TRACE root - Message 0
3 | [main] DEBUG org.apache.log4j.xml.DOMTestCase - Message 1
4 | [main] DEBUG root - Message 1
5 | [main] INFO org.apache.log4j.xml.DOMTestCase - Message 2
6 | [main] INFO root - Message 2
7 | [main] WARN org.apache.log4j.xml.DOMTestCase - Message 3
8 | [main] WARN root - Message 3
9 | [main] ERROR org.apache.log4j.xml.DOMTestCase - Message 4
10 | [main] ERROR root - Message 4
11 | [main] FATAL org.apache.log4j.xml.DOMTestCase - Message 5
12 | [main] FATAL root - Message 5
13 | [main] DEBUG org.apache.log4j.xml.DOMTestCase - Message 6
14 | java.lang.Exception: Just testing
15 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
16 | at org.apache.log4j.xml.DOMTestCase.test1(DOMTestCase.java:XXX)
17 | [main] DEBUG root - Message 6
18 | java.lang.Exception: Just testing
19 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
20 | at org.apache.log4j.xml.DOMTestCase.test1(DOMTestCase.java:XXX)
21 | [main] ERROR org.apache.log4j.xml.DOMTestCase - Message 7
22 | java.lang.Exception: Just testing
23 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
24 | at org.apache.log4j.xml.DOMTestCase.test1(DOMTestCase.java:XXX)
25 | [main] ERROR root - Message 7
26 | java.lang.Exception: Just testing
27 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
28 | at org.apache.log4j.xml.DOMTestCase.test1(DOMTestCase.java:XXX)
29 |
--------------------------------------------------------------------------------
/src/test/witness/dom.A2.4:
--------------------------------------------------------------------------------
1 | [main] TRACE org.apache.log4j.xml.DOMTestCase - Message 0
2 | [main] TRACE root - Message 0
3 | [main] DEBUG org.apache.log4j.xml.DOMTestCase - Message 1
4 | [main] DEBUG root - Message 1
5 | [main] INFO org.apache.log4j.xml.DOMTestCase - Message 2
6 | [main] INFO root - Message 2
7 | [main] WARN org.apache.log4j.xml.DOMTestCase - Message 3
8 | [main] WARN root - Message 3
9 | [main] ERROR org.apache.log4j.xml.DOMTestCase - Message 4
10 | [main] ERROR root - Message 4
11 | [main] FATAL org.apache.log4j.xml.DOMTestCase - Message 5
12 | [main] FATAL root - Message 5
13 | [main] DEBUG org.apache.log4j.xml.DOMTestCase - Message 6
14 | java.lang.Exception: Just testing
15 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
16 | at org.apache.log4j.xml.DOMTestCase.test4(DOMTestCase.java:XXX)
17 | [main] DEBUG root - Message 6
18 | java.lang.Exception: Just testing
19 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
20 | at org.apache.log4j.xml.DOMTestCase.test4(DOMTestCase.java:XXX)
21 | [main] ERROR org.apache.log4j.xml.DOMTestCase - Message 7
22 | java.lang.Exception: Just testing
23 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
24 | at org.apache.log4j.xml.DOMTestCase.test4(DOMTestCase.java:XXX)
25 | [main] ERROR root - Message 7
26 | java.lang.Exception: Just testing
27 | at org.apache.log4j.xml.DOMTestCase.common(DOMTestCase.java:XXX)
28 | at org.apache.log4j.xml.DOMTestCase.test4(DOMTestCase.java:XXX)
29 |
--------------------------------------------------------------------------------
/src/test/witness/drfa_blockedRollover.log:
--------------------------------------------------------------------------------
1 | INFO - Prior to rollover
2 | INFO - Rollover attempt while blocked
3 | INFO - Message after block removed
4 |
--------------------------------------------------------------------------------
/src/test/witness/fallback1:
--------------------------------------------------------------------------------
1 | FALLBACK - test - Message 0
2 | FALLBACK - root - Message 0
3 | FALLBACK - test - Message 1
4 | FALLBACK - root - Message 1
5 | FALLBACK - test - Message 2
6 | FALLBACK - root - Message 2
7 | FALLBACK - test - Message 3
8 | FALLBACK - root - Message 3
9 | FALLBACK - test - Message 4
10 | FALLBACK - root - Message 4
11 | FALLBACK - test - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.varia.ErrorHandlerTestCase.common(ErrorHandlerTestCase.java:XXX)
14 | at org.apache.log4j.varia.ErrorHandlerTestCase.test1(ErrorHandlerTestCase.java:XXX)
15 | FALLBACK - root - Message 5
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.varia.ErrorHandlerTestCase.common(ErrorHandlerTestCase.java:XXX)
18 | at org.apache.log4j.varia.ErrorHandlerTestCase.test1(ErrorHandlerTestCase.java:XXX)
19 | FALLBACK - test - Message 6
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.varia.ErrorHandlerTestCase.common(ErrorHandlerTestCase.java:XXX)
22 | at org.apache.log4j.varia.ErrorHandlerTestCase.test1(ErrorHandlerTestCase.java:XXX)
23 | FALLBACK - root - Message 6
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.varia.ErrorHandlerTestCase.common(ErrorHandlerTestCase.java:XXX)
26 | at org.apache.log4j.varia.ErrorHandlerTestCase.test1(ErrorHandlerTestCase.java:XXX)
27 |
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/hierarchyThreshold.1
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.2:
--------------------------------------------------------------------------------
1 | FATAL [main] log4j.HierarchyThresholdTest = m5
2 |
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.3:
--------------------------------------------------------------------------------
1 | ERROR [main] log4j.HierarchyThresholdTest = m4
2 | FATAL [main] log4j.HierarchyThresholdTest = m5
3 |
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.4:
--------------------------------------------------------------------------------
1 | WARN [main] log4j.HierarchyThresholdTest = m3
2 | ERROR [main] log4j.HierarchyThresholdTest = m4
3 | FATAL [main] log4j.HierarchyThresholdTest = m5
4 |
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.5:
--------------------------------------------------------------------------------
1 | INFO [main] log4j.HierarchyThresholdTest = m2
2 | WARN [main] log4j.HierarchyThresholdTest = m3
3 | ERROR [main] log4j.HierarchyThresholdTest = m4
4 | FATAL [main] log4j.HierarchyThresholdTest = m5
5 |
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.6:
--------------------------------------------------------------------------------
1 | DEBUG [main] log4j.HierarchyThresholdTest = m1
2 | INFO [main] log4j.HierarchyThresholdTest = m2
3 | WARN [main] log4j.HierarchyThresholdTest = m3
4 | ERROR [main] log4j.HierarchyThresholdTest = m4
5 | FATAL [main] log4j.HierarchyThresholdTest = m5
6 |
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.7:
--------------------------------------------------------------------------------
1 | TRACE [main] log4j.HierarchyThresholdTest = m0
2 | DEBUG [main] log4j.HierarchyThresholdTest = m1
3 | INFO [main] log4j.HierarchyThresholdTest = m2
4 | WARN [main] log4j.HierarchyThresholdTest = m3
5 | ERROR [main] log4j.HierarchyThresholdTest = m4
6 | FATAL [main] log4j.HierarchyThresholdTest = m5
7 |
--------------------------------------------------------------------------------
/src/test/witness/hierarchyThreshold.8:
--------------------------------------------------------------------------------
1 | TRACE [main] log4j.HierarchyThresholdTest = m0
2 | DEBUG [main] log4j.HierarchyThresholdTest = m1
3 | INFO [main] log4j.HierarchyThresholdTest = m2
4 | WARN [main] log4j.HierarchyThresholdTest = m3
5 | ERROR [main] log4j.HierarchyThresholdTest = m4
6 | FATAL [main] log4j.HierarchyThresholdTest = m5
7 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.1:
--------------------------------------------------------------------------------
1 | DEBUG - Message 0
2 | DEBUG - Message 0
3 | INFO - Message 1
4 | INFO - Message 1
5 | WARN - Message 2
6 | WARN - Message 2
7 | ERROR - Message 3
8 | ERROR - Message 3
9 | FATAL - Message 4
10 | FATAL - Message 4
11 | DEBUG - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test1(X)
15 | INFO - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test1(X)
19 | WARN - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test1(X)
23 | ERROR - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test1(X)
27 | FATAL - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test1(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.15:
--------------------------------------------------------------------------------
1 | DEBUG 1 - Message 0
2 | DEBUG 2 - Message 0
3 | INFO 3 - Message 1
4 | INFO 4 - Message 1
5 | WARN 5 - Message 2
6 | WARN 6 - Message 2
7 | ERROR 7 - Message 3
8 | ERROR 8 - Message 3
9 | FATAL 9 - Message 4
10 | FATAL 10 - Message 4
11 | DEBUG 11 - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test15(X)
15 | INFO 12 - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test15(X)
19 | WARN 13 - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test15(X)
23 | ERROR 14 - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test15(X)
27 | FATAL 15 - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test15(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.2:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest - Message 0
2 | [main] DEBUG root - Message 0
3 | [main] INFO atternLayoutTest - Message 1
4 | [main] INFO root - Message 1
5 | [main] WARN atternLayoutTest - Message 2
6 | [main] WARN root - Message 2
7 | [main] ERROR atternLayoutTest - Message 3
8 | [main] ERROR root - Message 3
9 | [main] FATAL atternLayoutTest - Message 4
10 | [main] FATAL root - Message 4
11 | [main] DEBUG atternLayoutTest - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test2(X)
15 | [main] INFO atternLayoutTest - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test2(X)
19 | [main] WARN atternLayoutTest - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test2(X)
23 | [main] ERROR atternLayoutTest - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test2(X)
27 | [main] FATAL atternLayoutTest - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test2(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.3:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest - Message 0
2 | [main] DEBUG root - Message 0
3 | [main] INFO atternLayoutTest - Message 1
4 | [main] INFO root - Message 1
5 | [main] WARN atternLayoutTest - Message 2
6 | [main] WARN root - Message 2
7 | [main] ERROR atternLayoutTest - Message 3
8 | [main] ERROR root - Message 3
9 | [main] FATAL atternLayoutTest - Message 4
10 | [main] FATAL root - Message 4
11 | [main] DEBUG atternLayoutTest - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test3(X)
15 | [main] INFO atternLayoutTest - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test3(X)
19 | [main] WARN atternLayoutTest - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test3(X)
23 | [main] ERROR atternLayoutTest - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test3(X)
27 | [main] FATAL atternLayoutTest - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test3(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.4:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest - Message 0
2 | [main] DEBUG root - Message 0
3 | [main] INFO atternLayoutTest - Message 1
4 | [main] INFO root - Message 1
5 | [main] WARN atternLayoutTest - Message 2
6 | [main] WARN root - Message 2
7 | [main] ERROR atternLayoutTest - Message 3
8 | [main] ERROR root - Message 3
9 | [main] FATAL atternLayoutTest - Message 4
10 | [main] FATAL root - Message 4
11 | [main] DEBUG atternLayoutTest - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test4(X)
15 | [main] INFO atternLayoutTest - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test4(X)
19 | [main] WARN atternLayoutTest - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test4(X)
23 | [main] ERROR atternLayoutTest - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test4(X)
27 | [main] FATAL atternLayoutTest - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test4(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.5:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest - Message 0
2 | [main] DEBUG root - Message 0
3 | [main] INFO atternLayoutTest - Message 1
4 | [main] INFO root - Message 1
5 | [main] WARN atternLayoutTest - Message 2
6 | [main] WARN root - Message 2
7 | [main] ERROR atternLayoutTest - Message 3
8 | [main] ERROR root - Message 3
9 | [main] FATAL atternLayoutTest - Message 4
10 | [main] FATAL root - Message 4
11 | [main] DEBUG atternLayoutTest - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test5(X)
15 | [main] INFO atternLayoutTest - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test5(X)
19 | [main] WARN atternLayoutTest - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test5(X)
23 | [main] ERROR atternLayoutTest - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test5(X)
27 | [main] FATAL atternLayoutTest - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test5(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.6:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest - Message 0
2 | [main] DEBUG root - Message 0
3 | [main] INFO atternLayoutTest - Message 1
4 | [main] INFO root - Message 1
5 | [main] WARN atternLayoutTest - Message 2
6 | [main] WARN root - Message 2
7 | [main] ERROR atternLayoutTest - Message 3
8 | [main] ERROR root - Message 3
9 | [main] FATAL atternLayoutTest - Message 4
10 | [main] FATAL root - Message 4
11 | [main] DEBUG atternLayoutTest - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test6(X)
15 | [main] INFO atternLayoutTest - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test6(X)
19 | [main] WARN atternLayoutTest - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test6(X)
23 | [main] ERROR atternLayoutTest - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test6(X)
27 | [main] FATAL atternLayoutTest - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test6(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.7:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest - Message 0
2 | [main] DEBUG root - Message 0
3 | [main] INFO atternLayoutTest - Message 1
4 | [main] INFO root - Message 1
5 | [main] WARN atternLayoutTest - Message 2
6 | [main] WARN root - Message 2
7 | [main] ERROR atternLayoutTest - Message 3
8 | [main] ERROR root - Message 3
9 | [main] FATAL atternLayoutTest - Message 4
10 | [main] FATAL root - Message 4
11 | [main] DEBUG atternLayoutTest - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test7(X)
15 | [main] INFO atternLayoutTest - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test7(X)
19 | [main] WARN atternLayoutTest - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test7(X)
23 | [main] ERROR atternLayoutTest - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test7(X)
27 | [main] FATAL atternLayoutTest - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test7(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.8:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest - Message 0
2 | [main] DEBUG root - Message 0
3 | [main] INFO atternLayoutTest - Message 1
4 | [main] INFO root - Message 1
5 | [main] WARN atternLayoutTest - Message 2
6 | [main] WARN root - Message 2
7 | [main] ERROR atternLayoutTest - Message 3
8 | [main] ERROR root - Message 3
9 | [main] FATAL atternLayoutTest - Message 4
10 | [main] FATAL root - Message 4
11 | [main] DEBUG atternLayoutTest - Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test8(X)
15 | [main] INFO atternLayoutTest - Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test8(X)
19 | [main] WARN atternLayoutTest - Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test8(X)
23 | [main] ERROR atternLayoutTest - Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test8(X)
27 | [main] FATAL atternLayoutTest - Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test8(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.9:
--------------------------------------------------------------------------------
1 | [main] DEBUG atternLayoutTest : Message 0
2 | [main] DEBUG root : Message 0
3 | [main] INFO atternLayoutTest : Message 1
4 | [main] INFO root : Message 1
5 | [main] WARN atternLayoutTest : Message 2
6 | [main] WARN root : Message 2
7 | [main] ERROR atternLayoutTest : Message 3
8 | [main] ERROR root : Message 3
9 | [main] FATAL atternLayoutTest : Message 4
10 | [main] FATAL root : Message 4
11 | [main] DEBUG atternLayoutTest : Message 5
12 | java.lang.Exception: Just testing
13 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
14 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test9(X)
15 | [main] INFO atternLayoutTest : Message 6
16 | java.lang.Exception: Just testing
17 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
18 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test9(X)
19 | [main] WARN atternLayoutTest : Message 7
20 | java.lang.Exception: Just testing
21 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
22 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test9(X)
23 | [main] ERROR atternLayoutTest : Message 8
24 | java.lang.Exception: Just testing
25 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
26 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test9(X)
27 | [main] FATAL atternLayoutTest : Message 9
28 | java.lang.Exception: Just testing
29 | at org.apache.log4j.EnhancedPatternLayoutTestCase.common(X)
30 | at org.apache.log4j.EnhancedPatternLayoutTestCase.test9(X)
31 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.mdc.1:
--------------------------------------------------------------------------------
1 | DEBUG - Hello World {{key1,va11}{key2,va12}}
2 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.mdc.2:
--------------------------------------------------------------------------------
1 | starting mdc pattern test
2 | empty mdc, no key specified in pattern : {}
3 | empty mdc, key1 in pattern :
4 | empty mdc, key2 in pattern :
5 | empty mdc, key3 in pattern :
6 | empty mdc, key1, key2, and key3 in pattern : ,,
7 | filled mdc, no key specified in pattern : {{key1,value1}{key2,value2}}
8 | filled mdc, key1 in pattern : value1
9 | filled mdc, key2 in pattern : value2
10 | filled mdc, key3 in pattern :
11 | filled mdc, key1, key2, and key3 in pattern : value1,value2,
12 | finished mdc pattern test
13 |
--------------------------------------------------------------------------------
/src/test/witness/pattern/enhancedPatternLayout.throwable:
--------------------------------------------------------------------------------
1 | starting throwable pattern test
2 | plain pattern, no exception
3 | plain pattern, with exception
4 | java.lang.Exception: Test Exception
5 | at org.apache.log4j.EnhancedPatternLayoutTestCase.testThrowable(X)
6 | %throwable, no exception
7 | %throwable, with exception
8 | java.lang.Exception: Test Exception
9 | at org.apache.log4j.EnhancedPatternLayoutTestCase.testThrowable(X)
10 | %throwable{short}, no exception
11 | %throwable{short}, with exception
12 | java.lang.Exception: Test Exception
13 | %throwable{none}, no exception
14 | %throwable{none}, with exception
15 | %throwable{0}, no exception
16 | %throwable{0}, with exception
17 | %throwable{1}, no exception
18 | %throwable{1}, with exception
19 | java.lang.Exception: Test Exception
20 | %throwable{100}, no exception
21 | %throwable{100}, with exception
22 | java.lang.Exception: Test Exception
23 | at org.apache.log4j.EnhancedPatternLayoutTestCase.testThrowable(X)
24 | %throwable{-n}, no exception
25 | %throwable{-n}, with exception
26 | java.lang.Exception: Test Exception
27 | at org.apache.log4j.EnhancedPatternLayoutTestCase.testThrowable(X)
28 |
--------------------------------------------------------------------------------
/src/test/witness/patternLayout.mdc.1:
--------------------------------------------------------------------------------
1 | DEBUG - Hello World {{key1,va11}{key2,va12}}
2 |
--------------------------------------------------------------------------------
/src/test/witness/patternLayout.mdc.clear:
--------------------------------------------------------------------------------
1 | DEBUG - Hello World {{key1,va11}{key2,va12}}
2 | DEBUG - Hello World {}
3 |
--------------------------------------------------------------------------------
/src/test/witness/prudent:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/prudent
--------------------------------------------------------------------------------
/src/test/witness/serialization/exception.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/serialization/exception.bin
--------------------------------------------------------------------------------
/src/test/witness/serialization/info.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/serialization/info.bin
--------------------------------------------------------------------------------
/src/test/witness/serialization/location.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/serialization/location.bin
--------------------------------------------------------------------------------
/src/test/witness/serialization/mdc.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/serialization/mdc.bin
--------------------------------------------------------------------------------
/src/test/witness/serialization/ndc.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/serialization/ndc.bin
--------------------------------------------------------------------------------
/src/test/witness/serialization/simple.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qos-ch/reload4j/965cd8a8f639041c7e4115f1c8309968b3c3136f/src/test/witness/serialization/simple.bin
--------------------------------------------------------------------------------
/src/test/witness/simple:
--------------------------------------------------------------------------------
1 | FATAL - Message 0
2 | ERROR - Message 1
3 | FATAL - Message 2
4 | ERROR - Message 3
5 | WARN - Message 4
6 | INFO - Message 5
7 | FATAL - Message 6
8 | ERROR - Message 7
9 | WARN - Message 8
10 | INFO - Message 9
11 | FATAL - Message 10
12 | ERROR - Message 11
13 | FATAL - Message 12
14 | ERROR - Message 13
15 | FATAL - Message 14
16 | ERROR - Message 15
17 | WARN - Message 16
18 | INFO - Message 17
19 | DEBUG - Message 18
20 | FATAL - Message 19
21 | ERROR - Message 20
22 | WARN - Message 21
23 | INFO - Message 22
24 | DEBUG - Message 23
25 | TRACE - Message 24
26 | FATAL - Message 25
27 | ERROR - Message 26
28 | WARN - Message 27
29 | INFO - Message 28
30 | DEBUG - Message 29
31 | java.lang.Exception: Just testing.
32 | at org.apache.log4j.MinimumTestCase.common(MinimumTestCase.java:XXX)
33 | at org.apache.log4j.MinimumTestCase.simple(MinimumTestCase.java:XXX)
34 | INFO - Messages should bear numbers 0 through 29.
35 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.1:
--------------------------------------------------------------------------------
1 | TRACE T1 [main] org.apache.log4j.net.SocketServerTestCase Message 1
2 | TRACE T1 [main] root Message 2
3 | DEBUG T1 [main] org.apache.log4j.net.SocketServerTestCase Message 3
4 | DEBUG T1 [main] root Message 4
5 | INFO T1 [main] org.apache.log4j.net.SocketServerTestCase Message 5
6 | WARN T1 [main] org.apache.log4j.net.SocketServerTestCase Message 6
7 | LETHAL T1 [main] org.apache.log4j.net.SocketServerTestCase Message 7
8 | DEBUG T1 [main] org.apache.log4j.net.SocketServerTestCase Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test1(SocketServerTestCase.java:XXX)
12 | ERROR T1 [main] root Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test1(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.2:
--------------------------------------------------------------------------------
1 | TRACE T2 [main] ? (?:?) Message 1
2 | TRACE T2 [main] ? (?:?) Message 2
3 | DEBUG T2 [main] ? (?:?) Message 3
4 | DEBUG T2 [main] ? (?:?) Message 4
5 | INFO T2 [main] ? (?:?) Message 5
6 | WARN T2 [main] ? (?:?) Message 6
7 | LETHAL T2 [main] ? (?:?) Message 7
8 | DEBUG T2 [main] ? (?:?) Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test2(SocketServerTestCase.java:XXX)
12 | ERROR T2 [main] ? (?:?) Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test2(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.3:
--------------------------------------------------------------------------------
1 | TRACE T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 1
2 | TRACE T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 2
3 | DEBUG T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 3
4 | DEBUG T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 4
5 | INFO T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 5
6 | WARN T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 6
7 | LETHAL T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 7
8 | DEBUG T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test3(SocketServerTestCase.java:XXX)
12 | ERROR T3 [main] org.apache.log4j.net.SocketServerTestCase (SocketServerTestCase.java:XXX) Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test3(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.4:
--------------------------------------------------------------------------------
1 | TRACE some T4 MDC-TEST4 [main] SocketServerTestCase - Message 1
2 | TRACE some T4 MDC-TEST4 [main] root - Message 2
3 | DEBUG some T4 MDC-TEST4 [main] SocketServerTestCase - Message 3
4 | DEBUG some T4 MDC-TEST4 [main] root - Message 4
5 | INFO some T4 MDC-TEST4 [main] SocketServerTestCase - Message 5
6 | WARN some T4 MDC-TEST4 [main] SocketServerTestCase - Message 6
7 | LETHAL some T4 MDC-TEST4 [main] SocketServerTestCase - Message 7
8 | DEBUG some T4 MDC-TEST4 [main] SocketServerTestCase - Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test4(SocketServerTestCase.java:XXX)
12 | ERROR some T4 MDC-TEST4 [main] root - Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test4(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.5:
--------------------------------------------------------------------------------
1 | TRACE some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 1
2 | TRACE some5 T5 MDC-TEST5 [main] root - Message 2
3 | DEBUG some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 3
4 | DEBUG some5 T5 MDC-TEST5 [main] root - Message 4
5 | INFO some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 5
6 | WARN some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 6
7 | LETHAL some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 7
8 | DEBUG some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test5(SocketServerTestCase.java:XXX)
12 | ERROR some5 T5 MDC-TEST5 [main] root - Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test5(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.6:
--------------------------------------------------------------------------------
1 | TRACE some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 1
2 | TRACE some6 T6 client-test6 MDC-TEST6 [main] root - Message 2
3 | DEBUG some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 3
4 | DEBUG some6 T6 client-test6 MDC-TEST6 [main] root - Message 4
5 | INFO some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 5
6 | WARN some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 6
7 | LETHAL some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 7
8 | DEBUG some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test6(SocketServerTestCase.java:XXX)
12 | ERROR some6 T6 client-test6 MDC-TEST6 [main] root - Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test6(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.7:
--------------------------------------------------------------------------------
1 | TRACE some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 1
2 | TRACE some7 T7 client-test7 MDC-TEST7 [main] root - Message 2
3 | DEBUG some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 3
4 | DEBUG some7 T7 client-test7 MDC-TEST7 [main] root - Message 4
5 | INFO some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 5
6 | WARN some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 6
7 | LETHAL some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 7
8 | DEBUG some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test7(SocketServerTestCase.java:XXX)
12 | ERROR some7 T7 client-test7 MDC-TEST7 [main] root - Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test7(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/socketServer.8:
--------------------------------------------------------------------------------
1 | TRACE some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 1
2 | TRACE some8 T8 shortSocketServer MDC-TEST8 [main] root - Message 2
3 | DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 3
4 | DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] root - Message 4
5 | INFO some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 5
6 | WARN some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 6
7 | LETHAL some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 7
8 | DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 8
9 | java.lang.Exception: Just testing
10 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
11 | at org.apache.log4j.net.SocketServerTestCase.test8(SocketServerTestCase.java:XXX)
12 | ERROR some8 T8 shortSocketServer MDC-TEST8 [main] root - Message 9
13 | java.lang.Exception: Just testing
14 | at org.apache.log4j.net.SocketServerTestCase.common(SocketServerTestCase.java:XXX)
15 | at org.apache.log4j.net.SocketServerTestCase.test8(SocketServerTestCase.java:XXX)
16 |
--------------------------------------------------------------------------------
/src/test/witness/ttcc:
--------------------------------------------------------------------------------
1 | [main] FATAL ERR - Message 0
2 | [main] ERROR ERR - Message 1
3 | [main] FATAL INF - Message 2
4 | [main] ERROR INF - Message 3
5 | [main] WARN INF - Message 4
6 | [main] INFO INF - Message 5
7 | [main] FATAL INF.UNDEF - Message 6
8 | [main] ERROR INF.UNDEF - Message 7
9 | [main] WARN INF.UNDEF - Message 8
10 | [main] INFO INF.UNDEF - Message 9
11 | [main] FATAL INF.ERR - Message 10
12 | [main] ERROR INF.ERR - Message 11
13 | [main] FATAL INF.ERR.UNDEF - Message 12
14 | [main] ERROR INF.ERR.UNDEF - Message 13
15 | [main] FATAL DEB - Message 14
16 | [main] ERROR DEB - Message 15
17 | [main] WARN DEB - Message 16
18 | [main] INFO DEB - Message 17
19 | [main] DEBUG DEB - Message 18
20 | [main] FATAL TRC - Message 19
21 | [main] ERROR TRC - Message 20
22 | [main] WARN TRC - Message 21
23 | [main] INFO TRC - Message 22
24 | [main] DEBUG TRC - Message 23
25 | [main] TRACE TRC - Message 24
26 | [main] FATAL UNDEF - Message 25
27 | [main] ERROR UNDEF - Message 26
28 | [main] WARN UNDEF - Message 27
29 | [main] INFO UNDEF - Message 28
30 | [main] DEBUG UNDEF - Message 29
31 | java.lang.Exception: Just testing.
32 | at org.apache.log4j.MinimumTestCase.common(MinimumTestCase.java:XXX)
33 | at org.apache.log4j.MinimumTestCase.ttcc(MinimumTestCase.java:XXX)
34 | [main] INFO INF - Messages should bear numbers 0 through 29.
35 |
--------------------------------------------------------------------------------
/src/test/witness/xmlLayout.3:
--------------------------------------------------------------------------------
1 |
2 | hi]]>]]>
3 |
4 |
5 |
6 |
7 | hi]]>]]>
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/test/witness/xmlLayout.mdc.1:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/witness/xmlLayout.mdc.2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/witness/xmlLayout.null:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------