equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
90 |
90 |
91 private static void checkLogRecords(File log) throws Exception { |
91 private static void checkLogRecords(File log) throws Exception { |
92 System.out.println("Checking log records in file: " + log); |
92 System.out.println("Checking log records in file: " + log); |
93 Pattern p = Pattern.compile("([\\.a-zA-Z:]+) (.*) \\[.*\\] source: (.*)"); |
93 Pattern p = Pattern.compile("([\\.a-zA-Z:]+) (.*) \\[.*\\] source: (.*)"); |
94 |
94 |
95 try (FileInputStream in = new FileInputStream(log)) { |
95 try (FileInputStream in = new FileInputStream(log); |
96 BufferedReader reader = new BufferedReader(new InputStreamReader(in)); |
96 BufferedReader reader = new BufferedReader(new InputStreamReader(in)); |
|
97 ) { |
97 String line; |
98 String line; |
98 int i = 0; |
99 int i = 0; |
99 while (i < messages.length && |
100 while (i < messages.length && |
100 (line = reader.readLine()) != null) { |
101 (line = reader.readLine()) != null) { |
101 String expectedLogger = loggers[i]; |
102 String expectedLogger = loggers[i]; |