-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/2.7.x'
# Conflicts: # mica-bom/build.gradle
- Loading branch information
Showing
3 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
mica-http/src/main/java/net/dreamlu/mica/http/HttpConsoleLogger.java
This file contains 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,39 @@ | ||
/* | ||
* Copyright (c) 2019-2029, Dreamlu ([email protected] & www.dreamlu.net). | ||
* <p> | ||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* http://www.gnu.org/licenses/lgpl.html | ||
* <p> | ||
* 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 net.dreamlu.mica.http; | ||
|
||
import okhttp3.logging.HttpLoggingInterceptor; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
/** | ||
* OkHttp console log. | ||
* | ||
* @author L.cm | ||
*/ | ||
public enum HttpConsoleLogger implements HttpLoggingInterceptor.Logger { | ||
/** | ||
* 实例 | ||
*/ | ||
INSTANCE; | ||
|
||
public void log(@Nonnull String message) { | ||
// 统一添加前缀,方便在茫茫日志中查看 | ||
System.out.printf("HttpLogger: %s\n", message); | ||
} | ||
|
||
} |
This file contains 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
This file contains 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