forked from ABAP-Logger/ABAP-Logger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzcl_logger_settings.clas.abap
84 lines (67 loc) · 2.03 KB
/
zcl_logger_settings.clas.abap
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
class zcl_logger_settings definition
public
final
create private
global friends zcl_logger_factory.
public section.
interfaces zif_logger_settings.
methods constructor.
protected section.
private section.
data auto_save type abap_bool.
data expiry_date type aldate_del .
data must_be_kept_until_expiry type del_before.
data max_exception_drill_down type i.
data use_2nd_db_connection type flag.
endclass.
class zcl_logger_settings implementation.
method constructor.
must_be_kept_until_expiry = abap_false.
max_exception_drill_down = 10.
use_2nd_db_connection = abap_true.
auto_save = abap_true.
endmethod.
method zif_logger_settings~get_autosave.
r_auto_save = auto_save.
endmethod.
method zif_logger_settings~set_autosave.
auto_save = i_auto_save.
r_self = me.
endmethod.
method zif_logger_settings~get_expiry_date.
r_expiry_date = expiry_date.
endmethod.
method zif_logger_settings~set_expiry_date.
expiry_date = i_expiry_date.
r_self = me.
endmethod.
method zif_logger_settings~set_expiry_in_days.
if i_num_days > 0.
expiry_date = sy-datum + i_num_days.
endif.
r_self = me.
endmethod.
method zif_logger_settings~get_must_be_kept_until_expiry.
r_must_be_kept_until_expiry = must_be_kept_until_expiry.
endmethod.
method zif_logger_settings~set_must_be_kept_until_expiry.
must_be_kept_until_expiry = i_must_be_kept_until_expiry.
r_self = me.
endmethod.
method zif_logger_settings~get_max_exception_drill_down.
r_levels = max_exception_drill_down.
endmethod.
method zif_logger_settings~set_max_exception_drill_down.
if i_levels >= 0.
max_exception_drill_down = i_levels.
endif.
r_self = me.
endmethod.
method zif_logger_settings~get_usage_of_secondary_db_conn.
r_2nd_db_connection_enabled = use_2nd_db_connection.
endmethod.
method zif_logger_settings~set_usage_of_secondary_db_conn.
use_2nd_db_connection = i_use_2nd_db_connection.
r_self = me.
endmethod.
endclass.