diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java index 158619f74d..539c1f5135 100644 --- a/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java +++ b/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java @@ -15,6 +15,7 @@ import java.time.ZoneId; import java.util.List; +import java.util.Locale; import ch.qos.logback.access.spi.IAccessEvent; import ch.qos.logback.core.CoreConstants; @@ -44,13 +45,18 @@ public void start() { zoneId = ZoneId.of(zoneIdString); } + Locale locale = null; + if (optionList != null && optionList.size() > 2) { + String localeIdStr = optionList.get(2); + locale = Locale.forLanguageTag(localeIdStr); + } + try { - cachingDateFormatter = new CachingDateFormatter(datePattern, zoneId); - // maximumCacheValidity = CachedDateFormat.getMaximumCacheValidity(pattern); + cachingDateFormatter = new CachingDateFormatter(datePattern, zoneId, locale); } catch (IllegalArgumentException e) { addWarn("Could not instantiate SimpleDateFormat with pattern " + datePattern, e); addWarn("Defaulting to " + CoreConstants.CLF_DATE_PATTERN); - cachingDateFormatter = new CachingDateFormatter(CoreConstants.CLF_DATE_PATTERN, zoneId); + cachingDateFormatter = new CachingDateFormatter(CoreConstants.CLF_DATE_PATTERN, zoneId, locale); } } diff --git a/logback-access/src/test/java/ch/qos/logback/access/pattern/ConverterTest.java b/logback-access/src/test/java/ch/qos/logback/access/pattern/ConverterTest.java index 07a4875f73..c5de1214d7 100644 --- a/logback-access/src/test/java/ch/qos/logback/access/pattern/ConverterTest.java +++ b/logback-access/src/test/java/ch/qos/logback/access/pattern/ConverterTest.java @@ -76,7 +76,7 @@ public void testDateConverter() { @Test public void testDateConverter_AU_locale() { DateConverter converter = new DateConverter(); - List<String> optionsList = Lists.list(CoreConstants.CLF_DATE_PATTERN, "Australia/Sydney", "en-AU"); + List<String> optionsList = Lists.list(CoreConstants.CLF_DATE_PATTERN, "Australia/Sydney", "en_AU"); converter.setOptionList(optionsList); converter.start(); diff --git a/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerCreation.java b/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerCreation.java index bdd4ba14ba..4f4db4a58e 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerCreation.java +++ b/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerCreation.java @@ -1,11 +1,15 @@ /** - * LOGBack: the reliable, fast and flexible logging library for Java. + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2024, QOS.ch. All rights reserved. * - * Copyright (C) 1999-2005, QOS.ch, LOGBack.com + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation * - * This library is free software, you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation. + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. */ package ch.qos.logback.classic; diff --git a/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerEventCreationTest.java b/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerEventCreationTest.java index 43e3c216cf..3310e18568 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerEventCreationTest.java +++ b/logback-classic/performance/src/java/ch/qos/logback/classic/LoggerEventCreationTest.java @@ -1,3 +1,16 @@ +/** + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. + * + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation + * + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. + */ package ch.qos.logback.classic; import org.slf4j.LoggerFactory; diff --git a/logback-classic/performance/src/java/ch/qos/logback/classic/RetreivalOfExistingLoggerSpeed.java b/logback-classic/performance/src/java/ch/qos/logback/classic/RetreivalOfExistingLoggerSpeed.java index 01dbab7228..8cd52e5fc8 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/classic/RetreivalOfExistingLoggerSpeed.java +++ b/logback-classic/performance/src/java/ch/qos/logback/classic/RetreivalOfExistingLoggerSpeed.java @@ -1,11 +1,15 @@ /** - * LOGBack: the reliable, fast and flexible logging library for Java. + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. * - * Copyright (C) 1999-2005, QOS.ch, LOGBack.com + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation * - * This library is free software, you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation. + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. */ package ch.qos.logback.classic; diff --git a/logback-classic/performance/src/java/ch/qos/logback/classic/SpeedOfDisabledDebug.java b/logback-classic/performance/src/java/ch/qos/logback/classic/SpeedOfDisabledDebug.java index 2ed5912afd..70c40a3fbf 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/classic/SpeedOfDisabledDebug.java +++ b/logback-classic/performance/src/java/ch/qos/logback/classic/SpeedOfDisabledDebug.java @@ -1,11 +1,15 @@ /** - * LOGBack: the reliable, fast and flexible logging library for Java. + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. * - * Copyright (C) 1999-2005, QOS.ch, LOGBack.com + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation * - * This library is free software, you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation. + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. */ package ch.qos.logback.classic; diff --git a/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/ClassNameAbbreviatorSpeed.java b/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/ClassNameAbbreviatorSpeed.java index de11a38b4a..7e27f892cf 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/ClassNameAbbreviatorSpeed.java +++ b/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/ClassNameAbbreviatorSpeed.java @@ -1,11 +1,15 @@ /** - * LOGBack: the reliable, fast and flexible logging library for Java. + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. * - * Copyright (C) 1999-2006, QOS.ch + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation * - * This library is free software, you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation. + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. */ package ch.qos.logback.classic.pattern; diff --git a/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/WriteSpeed.java b/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/WriteSpeed.java index fbede5e6f9..6fb594bbe3 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/WriteSpeed.java +++ b/logback-classic/performance/src/java/ch/qos/logback/classic/pattern/WriteSpeed.java @@ -1,11 +1,15 @@ /** - * LOGBack: the reliable, fast and flexible logging library for Java. + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. * - * Copyright (C) 1999-2005, QOS.ch, LOGBack.com + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation * - * This library is free software, you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation. + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. */ package ch.qos.logback.classic.pattern; diff --git a/logback-classic/performance/src/java/ch/qos/logback/reflect/Fruit.java b/logback-classic/performance/src/java/ch/qos/logback/reflect/Fruit.java index 13ccca01e7..cc13ec40b0 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/reflect/Fruit.java +++ b/logback-classic/performance/src/java/ch/qos/logback/reflect/Fruit.java @@ -1,3 +1,16 @@ +/** + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. + * + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation + * + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. + */ package ch.qos.logback.reflect; public class Fruit { diff --git a/logback-classic/performance/src/java/ch/qos/logback/reflect/JEXLTest.java b/logback-classic/performance/src/java/ch/qos/logback/reflect/JEXLTest.java index 53102e4cfe..d6d7f0d798 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/reflect/JEXLTest.java +++ b/logback-classic/performance/src/java/ch/qos/logback/reflect/JEXLTest.java @@ -1,3 +1,16 @@ +/** + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. + * + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation + * + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. + */ package ch.qos.logback.reflect; import org.apache.commons.jexl.Expression; diff --git a/logback-classic/performance/src/java/ch/qos/logback/reflect/JaninoTest.java b/logback-classic/performance/src/java/ch/qos/logback/reflect/JaninoTest.java index 63ed41451a..510e3d7714 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/reflect/JaninoTest.java +++ b/logback-classic/performance/src/java/ch/qos/logback/reflect/JaninoTest.java @@ -1,3 +1,16 @@ +/** + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. + * + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation + * + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. + */ package ch.qos.logback.reflect; import org.codehaus.janino.ExpressionEvaluator; diff --git a/logback-classic/performance/src/java/ch/qos/logback/reflect/ReflectionSpeed.java b/logback-classic/performance/src/java/ch/qos/logback/reflect/ReflectionSpeed.java index 81f6c6af8f..adc3cfc166 100644 --- a/logback-classic/performance/src/java/ch/qos/logback/reflect/ReflectionSpeed.java +++ b/logback-classic/performance/src/java/ch/qos/logback/reflect/ReflectionSpeed.java @@ -1,3 +1,16 @@ +/** + * Logback: the reliable, generic, fast and flexible logging framework. + * Copyright (C) 1999-2022, QOS.ch. All rights reserved. + * + * This program and the accompanying materials are dual-licensed under + * either the terms of the Eclipse Public License v1.0 as published by + * the Eclipse Foundation + * + * or (per the licensee's choosing) + * + * under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation. + */ package ch.qos.logback.reflect; import java.lang.reflect.InvocationTargetException; diff --git a/logback-core/src/test/input/compress3.copy b/logback-core/src/test/input/compress3.copy index 87087da0cc..885e4175d1 100644 --- a/logback-core/src/test/input/compress3.copy +++ b/logback-core/src/test/input/compress3.copy @@ -1,11 +1,3 @@ - - LOGBack: the generic, reliable, fast and flexible logging framework. - - Copyright (C) 1999-2006, QOS.ch - - This library is free software, you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free - Software Foundation. <?xml version="1.0"?> <document> diff --git a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java index 00a1199190..a049a6f90d 100755 --- a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java +++ b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java @@ -291,7 +291,7 @@ public void dailySizeBasedRolloverWithSizeCap() { // 2016-03-05 00:14:39 CET long simulatedTime = 1457133279186L; ConfigParameters params = new ConfigParameters(simulatedTime); - String fileNamePattern = randomOutputDir + "/%d{" + DAILY_DATE_PATTERN + "}-clean.%i"; + String fileNamePattern = randomOutputDir + "/%d{" + DAILY_DATE_PATTERN + ", CET}-clean.%i"; params.maxHistory(60).fileNamePattern(fileNamePattern).simulatedNumberOfPeriods(10).sizeCap(sizeCap); logOverMultiplePeriods(params);