Flutter Engine
The Flutter Engine
Logger.java
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012, the Dart project authors.
3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
5 * in compliance with the License. You may obtain a copy of the License at
6 *
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 * or implied. See the License for the specific language governing permissions and limitations under
12 * the License.
13 */
14package org.dartlang.vm.service.logging;
15
16/**
17 * The interface {@code Logger} defines the behavior of objects that can be used to receive
18 * information about errors. Implementations usually write this information to a file, but can also
19 * record the information for later use (such as during testing) or even ignore the information.
20 */
21public interface Logger {
22
23 /**
24 * Implementation of {@link Logger} that does nothing.
25 */
26 class NullLogger implements Logger {
27 @Override
28 public void logError(String message) {
29 }
30
31 @Override
32 public void logError(String message, Throwable exception) {
33 }
34
35 @Override
36 public void logInformation(String message) {
37 }
38
39 @Override
40 public void logInformation(String message, Throwable exception) {
41 }
42 }
43
44 static final Logger NULL = new NullLogger();
45
46 /**
47 * Log the given message as an error.
48 *
49 * @param message an explanation of why the error occurred or what it means
50 */
51 void logError(String message);
52
53 /**
54 * Log the given exception as one representing an error.
55 *
56 * @param message an explanation of why the error occurred or what it means
57 * @param exception the exception being logged
58 */
59 void logError(String message, Throwable exception);
60
61 /**
62 * Log the given informational message.
63 *
64 * @param message an explanation of why the error occurred or what it means
65 */
66 void logInformation(String message);
67
68 /**
69 * Log the given exception as one representing an informational message.
70 *
71 * @param message an explanation of why the error occurred or what it means
72 * @param exception the exception being logged
73 */
74 void logInformation(String message, Throwable exception);
75}
void logInformation(String message, Throwable exception)
Definition: Logger.java:40
void logError(String message, Throwable exception)
Definition: Logger.java:32
void logInformation(String message, Throwable exception)
void logError(String message, Throwable exception)
Win32Message message