-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDesharp.config.example
More file actions
179 lines (159 loc) · 8.65 KB
/
Desharp.config.example
File metadata and controls
179 lines (159 loc) · 8.65 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<!-- For web applications only - add Desharp http module by: -->
<system.webServer>
<modules>
<add name="Desharp" type="Desharp.Module" preCondition="managedHandler" />
</modules>
<httpErrors errorMode="Detailed" />
</system.webServer>
<appSettings>
<!--
If `true`, all dumps by method `Debug.Dump()` are internally rendered and displayed.
For web applications, there is debug panel is displayed in browser with dumped variables or rendered exceptions.
For desktop applications, there is console priniting enabled or output debug window printing enabled.
- Not required to configure, but very recomanded.
- Possible values: `1`, `0`, `true`, `false`.
- If not configured - enabled is only when VS debugger is attached or entry assembly is builded as Debug.
- If disabled - all `Debug.Log()` calls are still enabled and executed, see more option `Desharp:Levels`.
-->
<add key="Desharp:Enabled" value="1" />
<!--
Logs content format.
- Not required, `text` by default.
- Possible values: `html`, `text`.
-->
<add key="Desharp:Output" value="html" />
<!--
Client IP adresses list to limit `Desharp` enabled state only for some clients.
- Not required to configure, very recomanded for web applications.
- Possible values: IPv4 or IPv6, separated by comma (IPv6 without `[]` brackets).
- If not configured and `Desharp` is in enabled state, then `Desharp` is enabled for all clients.
-->
<add key="Desharp:DebugIps" value="127.0.0.1,::1" />
<!--
Loggin levels to enable/disable to write on hard drive and also possibility to enable/disable email notifications.
- Not required, recomanded.
- Possible values: `exception`, `debug`, `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`, `javascript`.
- If not configured, all logging levels are enabled for logging and not enabled for email notifications.
- If at least one level is configured, then all other configured levels are disabled for logging and for email notifications.
- If you want to enable any logging level - put the level name into node `value` attribute (comma separated).
- If you want to disable any logging level - put minus (-) character before level name or remove level name.
- If you want to enable any logging level for email notifications - put plus (+) character before level name.
For any notification type with plus sign, it required to configure `Desharp:NotifySettings` property!
-->
<add key="Desharp:Levels" value="+exception,debug,info,-notice,-warning,+error,+critical,alert,+emergency,javascript" />
<!--
Logged messages notifications by configured levels.
- Not required, recomanded in production mode.
- Possible values:
- `host`: Required, mail server smtp domain | IPv4 | IPv6.
- `port`: Not required, `25` by default.
- `ssl`: Not required, `false` by default.
- `from`: Required if no username and password specified, email address to specify sender, if no value specified, there is used `username` value.
- `username` and `password`: Required if no `from` sender specified, mail server username/password credentials for sender account, always necessary to use together.
- `domain` - Not required, no default value. Used only as third parametter for `System.Net.NetworkCredential` if presented.
- `to`: Required, single recepient email adress or multiple adresses separated by semicolon `;`.
- `priority`: Not required, possible values: `low` | `normal` | `high` (`normal` by defaut).
- `timeout`: Not required, smtp server timeout specified in miliseconds, `10000` by default (10 seconds).
- `background`: Not required at all. Default value is `true` to send all notifications in background thread.
Use `false` value only to debug email sending.
-->
<add key="Desharp:NotifySettings" value="{
host: 'smtp.company.com',
port: 587,
ssl: true,
user: 'noreply@company.com',
password: 'your-secret-password',
from: 'noreply@company.com',
to: 'your.name@gmail.com',
priority: 'high',
timeout: 30000
}" />
<!--
Web debug bar panels.
- Not required, recomanded.
- Full class names separated by comma `,`.
- Panel class has to implement public interface: `Desharp.Panels.IPanel`
- Panel class could implement interface: `Desharp.Panels.ISessionPanel`,
where are method called when session is is read and written every request.
- There are always enabled build-in panels for execution time, dumps and exceptions.
- Build-in panels you can optionally use:
- `Desharp.Panels.SystemInfo` - to display most important request info
- `Desharp.Panels.Session` - to display basic session configuration and values
- `Desharp.Panels.Routing` - to display matched MVC routes (still in TODO state)
-->
<add key="Desharp:Panels" value="Desharp.Panels.SystemInfo,Desharp.Panels.Session" />
<!--
Absolute or relative path from application root directory.
- Not required, recomanded.
- Relative path from app root has to start with '~/' like: '~/Path/To/Logs'.
- If not configured, all log files are written into application root directory.
-->
<add key="Desharp:Directory" value="~/Logs" />
<!--
Always render source location from where dump has been called by `Debug.Dump()`.
- Not required, recomanded.
- Possible values: `1`, `0`, `true`, `false`.
- If not configured, no dumps source locations are rendered in dump ouputs.
-->
<add key="Desharp:SourceLocation" value="1" />
<!--
Milisecond timeout how often logged messages or exceptions are written from memory to hard drive.
- Not required, recomanded for speed optimalization in production mode.
- Possible values - use digits to define any miliseconds integer value.
- If not configured, all messages or exceptions are written immediately
in current thread, where is called `Desharp.Log()`.
-->
<add key="Desharp:WriteMiliseconds" value="5000" />
<!--
.NET objects dumping depth.
- Not required, recomanded for speed optimalization in production mode.
- Possible values: just digit like `2`, `3`, `4` or `5`.
- If not configured, `3` by default.
-->
<add key="Desharp:Depth" value="3" />
<!--
Maximum length for dumped string values.
- Not required, recomanded for speed optimalization in production mode.
- Possible values: just digit like `512`, `1024` or `5000`...
- If not configured, `1024` by default.
-->
<add key="Desharp:MaxLength" value="1024" />
<!--
Custom web error page.
- Not required, recomanded for production mode.
- If `Desharp` is not enabled and there is uncaught exception in your application,
you can use custom static error page to transfer into client browser.
- If not configured - `Desharp` build-in error page is used by default with error 500.
-->
<add key="Desharp:ErrorPage" value="~/custom-error-page-500.html" />
<!--
Dump all internal .NET events, properties ad fields in custom class instances,
(created internally and usually for properties values )and all class instance
member types marked with `System.Runtime.CompilerServices.CompillerGenerated`
attribute or with `Desharp.Hidden` attribute.
This option is usefull to see everything in memory.
- Not required, recomanded only for deep development view.
- Possible values: `1`, `0`, `true`, `false`.
- If not configured, `false` by default.
- If not configured or configured as `false`, you can hide
your class members for dumping and logging by attributes:
- [System.Runtime.CompilerServices.CompilerGenerated] - .NET standard.
- [Desharp.Hidden] - shorter.
-->
<add key="Desharp:DumpCompillerGenerated" value="true" />
<!--
Default editor param value.
- Not required, marginal.
- For automatic file opening in Visual Studio or in any other editor by rendered links:
`<a href="editor://file=...&line=...&editor=MSVS2019">../File.cs:123</a>
- Possible values: any string key to open your editor from html output by.
- If not configured, value is automaticly detected by Visual Studio instalation on current system.
-->
<add key="Desharp:Editor" value="MSVS2019" />
</appSettings>
</configuration>