Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 java.logging.jmod - Logging Module
JDK 17 java.logging.jmod is the JMOD file for JDK 17 Logging module.
JDK 17 Logging module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.logging.jmod.
JDK 17 Logging module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Logging module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.logging.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/net/www/protocol/http/logging/HttpLogFormatter.java
/* * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.net.www.protocol.http.logging; import java.util.logging.LogRecord; import java.util.regex.*; /** * A Formatter to make the HTTP logs a bit more palatable to the developer * looking at them. The idea is to present the HTTP events in such a way that * commands and headers are easily spotted (i.e. on separate lines). * @author jccollet */ public class HttpLogFormatter extends java.util.logging.SimpleFormatter { // Pattern for MessageHeader data. Mostly pairs within curly brackets private static volatile Pattern pattern = null; // Pattern for Cookies private static volatile Pattern cpattern = null; public HttpLogFormatter() { if (pattern == null) { pattern = Pattern.compile("\\{[^\\}]*\\}"); cpattern = Pattern.compile("[^,\\] ]{2,}"); } } @Override public String format(LogRecord record) { String sourceClassName = record.getSourceClassName(); if (sourceClassName == null || !(sourceClassName.startsWith("sun.net.www.protocol.http") || sourceClassName.startsWith("sun.net.www.http"))) { return super.format(record); } String src = record.getMessage(); StringBuilder buf = new StringBuilder("HTTP: "); if (src.startsWith("sun.net.www.MessageHeader@")) { // MessageHeader logs are composed of pairs within curly brackets // Let's extract them to make it more readable. That way we get one // header pair (name, value) per line. A lot easier to read. Matcher match = pattern.matcher(src); while (match.find()) { int i = match.start(); int j = match.end(); String s = src.substring(i + 1, j - 1); if (s.startsWith("null: ")) { s = s.substring(6); } if (s.endsWith(": null")) { s = s.substring(0, s.length() - 6); } buf.append("\t").append(s).append("\n"); } } else if (src.startsWith("Cookies retrieved: {")) { // This comes from the Cookie handler, let's clean up the format a bit String s = src.substring(20); buf.append("Cookies from handler:\n"); while (s.length() >= 7) { if (s.startsWith("Cookie=[")) { String s2 = s.substring(8); int c = s2.indexOf("Cookie2=["); if (c > 0) { s2 = s2.substring(0, c-1); s = s2.substring(c); } else { s = ""; } if (s2.length() < 4) { continue; } Matcher m = cpattern.matcher(s2); while (m.find()) { int i = m.start(); int j = m.end(); if (i >= 0) { String cookie = s2.substring(i + 1, j > 0 ? j - 1 : s2.length() - 1); buf.append("\t").append(cookie).append("\n"); } } } if (s.startsWith("Cookie2=[")) { String s2 = s.substring(9); int c = s2.indexOf("Cookie=["); if (c > 0) { s2 = s2.substring(0, c-1); s = s2.substring(c); } else { s = ""; } Matcher m = cpattern.matcher(s2); while (m.find()) { int i = m.start(); int j = m.end(); if (i >= 0) { String cookie = s2.substring(i+1, j > 0 ? j-1 : s2.length() - 1); buf.append("\t").append(cookie).append("\n"); } } } } } else { // Anything else we let as is. buf.append(src).append("\n"); } return buf.toString(); } }
⏎ sun/net/www/protocol/http/logging/HttpLogFormatter.java
Or download all of them as a single archive file:
File name: java.logging-17.0.5-src.zip File size: 106791 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.management.jmod - Management Module
2023-09-23, 2010👍, 0💬
Popular Posts:
How to download and install JDK (Java Development Kit) 7? If you want to write Java applications, yo...
Joda-Time provides a quality replacement for the Java date and time classes. The design allows for m...
JDK 11 java.sql.jmod is the JMOD file for JDK 11 SQL (Structured Query Language) module. JDK 11 SQL ...
What Is javamail1_1_3.zip? javamail1_1_3.zip is the binary package of JavaMail API 1.1.3 in ZIP form...
What is the dom\GetElementsByTagName .javaprovided in the Apache Xerces package? I have Apache Xerce...