1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
/*******************************************************************************
* Copyright (c) 2009 THALES GLOBAL SERVICES.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.business.api.logger;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
/**
* Interface that log runtime errors.
*
* @author smonnier
*
*/
public interface RuntimeLogger {
/**
* Add error entry to the logger.
*
* @param odesignObject
* EObject where the error come from
* @param feature
* element of the EObject where the error come from. May be
* <code>null</code>.
* @param message
* error message we want to display
*/
void error(EObject odesignObject, EStructuralFeature feature, String message);
/**
* Add error entry to the logger.
*
* @param odesignObject
* EObject where the error come from
* @param feature
* element of the EObject where the error come from. May be
* <code>null</code>.
* @param exception
* a low-level exception, or <code>null</code> if not applicable
*/
void error(EObject odesignObject, EStructuralFeature feature, Throwable exception);
/**
* Add error entry to the logger.
*
* @param odesignObject
* EObject where the warning come from
* @param feature
* element of the EObject where the warning come from. May be
* <code>null</code>.
* @param exception
* a low-level exception, or <code>null</code> if not applicable
*/
void warning(EObject odesignObject, EStructuralFeature feature, Throwable exception);
/**
* Add error entry to the logger.
*
* @param odesignObject
* EObject where the warning come from
* @param feature
* element of the EObject where the warning come from. May be
* <code>null</code>.
* @param message
* error message we want to display
*/
void warning(EObject odesignObject, EStructuralFeature feature, String message);
/**
* Add error entry to the logger.
*
* @param odesignObject
* EObject where the info come from
* @param feature
* element of the EObject where the info come from. May be
* <code>null</code>.
* @param message
* error message we want to display
*/
void info(EObject odesignObject, EStructuralFeature feature, String message);
/**
* Add error entry to the logger.
*
* @param odesignObject
* EObject where the info come from
* @param feature
* element of the EObject where the info come from. May be
* <code>null</code>.
* @param exception
* a low-level exception, or <code>null</code> if not applicable
*/
void info(EObject odesignObject, EStructuralFeature feature, Throwable exception);
/**
* Clears all logged entries.
*/
void clearAll();
/**
* Clears all logged entries for the EObject.
*
* @param eObject
* EObject we want to clearAll logged entries
*/
void clear(EObject eObject);
}
|