"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderCustomLayoutTest.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

SyslogAppenderCustomLayoutTest.java  (apache-log4j-2.11.1-src):SyslogAppenderCustomLayoutTest.java  (apache-log4j-2.11.2-src)
skipping to change at line 20 skipping to change at line 20
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the license for the specific language governing permissions and * See the license for the specific language governing permissions and
* limitations under the license. * limitations under the license.
*/ */
package org.apache.logging.log4j.core.appender; package org.apache.logging.log4j.core.appender;
import java.io.Serializable;
import org.apache.logging.log4j.core.Layout;
import org.apache.logging.log4j.core.appender.SyslogAppender.Builder; import org.apache.logging.log4j.core.appender.SyslogAppender.Builder;
import org.apache.logging.log4j.core.layout.SyslogLayout; import org.apache.logging.log4j.core.layout.SyslogLayout;
import org.apache.logging.log4j.core.net.Facility; import org.apache.logging.log4j.core.net.Facility;
public class SyslogAppenderCustomLayoutTest extends SyslogAppenderTest { public class SyslogAppenderCustomLayoutTest extends SyslogAppenderTest {
@Override @Override
protected Facility getExpectedFacility() { protected Facility getExpectedFacility() {
return Facility.LOCAL3; return Facility.LOCAL3;
} }
@Override @Override
protected Builder newSyslogAppenderBuilder(final String protocol, final Stri ng format, final boolean newLine) { protected Builder newSyslogAppenderBuilder(final String protocol, final Stri ng format, final boolean newLine) {
final Builder builder = super.newSyslogAppenderBuilder(protocol, format, newLine); final Builder builder = super.newSyslogAppenderBuilder(protocol, format, newLine);
builder.withLayout(SyslogLayout.newBuilder().setFacility(Facility.LOCAL3 ).setIncludeNewLine(true).build()); builder.setLayout((Layout<? extends Serializable>) SyslogLayout.newBuild er().setFacility(Facility.LOCAL3).setIncludeNewLine(true).build());
return builder; return builder;
} }
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)