Skip to content

Commit

Permalink
datetime.rs add DTPD pattern for catalina stdout
Browse files Browse the repository at this point in the history
add `DTPD!` entry for tomcat catalina stdout

add log catalina.out

Issue #81
  • Loading branch information
jtmoon79 committed Feb 9, 2023
1 parent e46b1f9 commit 8def2f6
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
21 changes: 21 additions & 0 deletions logs/programs/tomcat/catalina.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
08-Feb-2023 12:12:09.827 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-0.0.0.0-8080"]
08-Feb-2023 12:12:09.848 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 513 ms
08-Feb-2023 12:12:09.857 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
08-Feb-2023 12:12:09.857 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.79]
08-Feb-2023 12:12:20.063 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/tomcat/apache-tomcat-8.5.79/lib/slf4j-simple-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.6)

LOGBACK: No context given for ch.qos.logback.classic.AsyncAppender[null]
08-Feb-2023 12:12:48.820 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-0.0.0.0-8080"]
08-Feb-2023 12:12:48.822 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 38973 ms
24 changes: 22 additions & 2 deletions src/data/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,7 @@ pub type DateTimeParseInstrsRegexVec = Vec<DateTimeRegex>;
// XXX: do not forget to update `#[test_case()]` for test `test_DATETIME_PARSE_DATAS_test_cases`
// in `datetime_tests.rs`. Should have test cases, `#[test_case(XX)]`, for values `0` to
// `DATETIME_PARSE_DATAS_LEN-1`.
pub const DATETIME_PARSE_DATAS_LEN: usize = 99;
pub const DATETIME_PARSE_DATAS_LEN: usize = 100;

/// Built-in [`DateTimeParseInstr`] datetime parsing patterns.
///
Expand Down Expand Up @@ -3072,6 +3072,26 @@ pub const DATETIME_PARSE_DATAS: [DateTimeParseInstr; DATETIME_PARSE_DATAS_LEN] =
line!(),
),
// ---------------------------------------------------------------------------------------------
//
// tomcat catalina stdout log format, from file `./logs/programs/tomcat/catalina.out`
// example with offset:
//
// 1 2 3
// 0123456789012345678901234567890
// 08-Feb-2023 12:12:09.827 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-0.0.0.0-8080"]
//
DTPD!(
concatcp!("^", CGP_DAYde, D_Dq, CGP_MONTHb, D_Dq, CGP_YEAR, RP_BLANK, CGP_HOUR, D_T, CGP_MINUTE, D_T, CGP_SECOND, D_SF, CGP_FRACTIONAL3, RP_NOALNUMpm),
DTFSS_bdHMSYf, 0, 30, CGN_DAY, CGN_FRACTIONAL,
&[
(0, 24, (O_L, 2023, 2, 8, 12, 13, 9, 827000000), r#"08-Feb-2023 12:13:09.827 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-0.0.0.0-8080"]"#),
(0, 24, (O_L, 2023, 2, 8, 12, 13, 20, 63000000), "08-Feb-2023 12:13:20.063 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.\nSLF4J: Class path contains multiple SLF4J bindings."),
],
line!(),
),
// TODO: add new `DTPD!` copied from prior `DTPD!` with varying timezones and more lenient fractional
//
// ---------------------------------------------------------------------------------------------
// from file `./logs/synology/synoupdate.log`
// example with offset:
//
Expand Down Expand Up @@ -3491,7 +3511,7 @@ pub const DATETIME_PARSE_DATAS: [DateTimeParseInstr; DATETIME_PARSE_DATAS_LEN] =
line!(),
),
// TODO: add prior without any TZ

//
// from file `./logs/programs/proftpd/xferlog`, Issue #42
// example with offset:
//
Expand Down
3 changes: 2 additions & 1 deletion src/tests/datetime_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ fn test_DATETIME_PARSE_DATAS_test_cases_has_all_test_cases() {
// IF YOU CHANGE THIS NUMBER THEN ALSO UPDATE THE GENERATED TEST CASES
// FOR `test_DATETIME_PARSE_DATAS_test_cases` BELOW! THOSE TESTS SHOULD
// BE FROM ZERO TO ONE LESS THAN THIS NUMBER
99,
100,
DATETIME_PARSE_DATAS.len(),
"Did you update?\n\n #[test_case({0})]\n fn test_DATETIME_PARSE_DATAS_test_cases()\n\nShould be one less than DATETIME_PARSE_DATAS_LEN {0}\n\n",
DATETIME_PARSE_DATAS_LEN
Expand Down Expand Up @@ -350,6 +350,7 @@ fn test_DATETIME_PARSE_DATAS_test_cases_has_all_test_cases() {
#[test_case(96)]
#[test_case(97)]
#[test_case(98)]
#[test_case(99)]
fn test_DATETIME_PARSE_DATAS_test_cases(index: usize) {
stack_offset_set(Some(2));

Expand Down

0 comments on commit 8def2f6

Please sign in to comment.