-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Acesslog dateformat enhancemnet #3274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
beiwei30
merged 16 commits into
apache:master
from
khanimteyaz:acesslog-dateformat-enhancemnet
Feb 2, 2019
Merged
Changes from 9 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4704218
Merge pull request #1 from apache/master
khanimteyaz 3c972a1
Merge pull request #3 from apache/master
khanimteyaz 6eaf970
Merge pull request #4 from apache/master
khanimteyaz 61dfa3c
Merge pull request #6 from apache/master
khanimteyaz 565aa1a
Merge pull request #7 from apache/master
khanimteyaz 5b67c0f
Merge pull request #8 from apache/master
khanimteyaz a868472
Merge pull request #9 from apache/master
khanimteyaz ad7c7cf
Merge pull request #10 from apache/master
khanimteyaz 6cb044c
#3026 Access log related changed
khanimteyaz bf6e9ab
Reviwe comment incorporated given by @satansk and removed unuded method
khanimteyaz 9a98de6
Incorporated @beiwei30 review comment, incorporated common-lang3 time…
khanimteyaz 5224d58
Merge branch 'acesslog-dateformat-enhancemnet' of https://github.com/…
khanimteyaz 896066d
Added rat entry for common lang3 FastDateFormat related java files
khanimteyaz d1342dd
Merge branch 'acesslog-dateformat-enhancemnet' of https://github.com/…
beiwei30 52b3353
switch back to jdk's dateformatter
beiwei30 4f6d008
Merge pull request #11 from beiwei30/khanimteyaz-acesslog-dateformat-…
khanimteyaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
dubbo-common/src/main/java/org/apache/dubbo/common/utils/DateUtil.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.dubbo.common.utils; | ||
|
|
||
| import org.apache.commons.lang3.time.FastDateFormat; | ||
|
|
||
| import java.util.Date; | ||
|
|
||
| /** | ||
| * This class is utility to provide dubbo date formatting and parsing. | ||
| */ | ||
| public final class DateUtil { | ||
|
|
||
| private DateUtil() { | ||
|
|
||
| }; | ||
|
|
||
| /** | ||
| * This method used to return a formatted string of a given date object. | ||
| * @param date Input data object | ||
| * @param format format of data. | ||
| * @return | ||
| */ | ||
| public static String format(Date date,String format) { | ||
| Assert.notNull(date,"Given date can't be null"); | ||
| Assert.notEmptyString(format,"Given date format can't be null or empty"); | ||
|
khanimteyaz marked this conversation as resolved.
Outdated
|
||
| return FastDateFormat.getInstance(format).format(date); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.