@@ -6,7 +6,6 @@ Out of the box, [Log viewer](../README.md) will have the following configuration
66
77``` yaml
88fd_log_viewer :
9- enable_default_monolog : true
109 home_route : null
1110
1211 log_files :
@@ -25,17 +24,14 @@ fd_log_viewer:
2524 log_message_pattern : ' /^\[(?P<date>[^\]]+)\]\s+(?P<channel>[^\.]+)\.(?P<severity>[^:]+):\s+(?P<message>.*)\s+(?P<context>[[{].*?[\]}])\s+(?P<extra>[[{].*?[\]}])\s+$/s'
2625 date_format : " Y-m-d H:i:s"
2726
27+ hosts :
28+ localhost :
29+ name : Local
30+ host : null
2831` ` `
2932
3033## Configuration
3134
32- ### enable_default_monolog
33-
34- ** type** : ` boolean ` . Default: ` true `
35-
36- Out of the box the bundle is configured with a default monolog configuration. Set this to ` false ` to override this behaviour.
37- <br ><br >
38-
3935### home_route
4036
4137**type**: ` string|null`. Default: `null`
@@ -54,13 +50,14 @@ This entry allows you to add more log file directories to the Log Viewer. Each e
5450
5551**type**: `string` (`enum: monolog(.json)|http-access|apache-error|nginx-error`)
5652
57- This is the type of log file that will be read.
53+ This is the type of log file that will be read.
54+
5855- ` monolog` is the default type and will read the default monolog log files.
5956- `monolog.json` will read the monolog log files that use `formatter : ' monolog.formatter.json' ` .
6057- ` http-access` will read the access log files of Apache and Nginx.
6158- ` apache-error` will read the error log files of Apache.
6259- ` nginx-error` will read the error log files of Nginx.
63- <br ><br >
60+ <br><br>
6461
6562# ## log_files.name
6663
@@ -101,19 +98,21 @@ Example:
10198` ` ` text
10299*.log,*.txt
103100` ` `
101+
104102<br>
105103
106104# ## log_files.finder.depth
105+
107106**type**: `int|string|string[]|null`. Default: `'== 0'`
108107
109108The maximum depth of directories to search for log files. If set to null all subdirectories will be added.
110109
111110Example :
111+
112112- ` '== 0'` will only search in the specified directory.
113113- ` '>= 0'` will search in the specified directory and all subdirectories.
114114- ` ['>= 0', '< 3]` will search in the specified directory and all subdirectories up to a depth of 2.
115- <br ><br >
116-
115+ <br><br>
117116
118117# ## log_files.finder.ignoreUnreadableDirs
119118
@@ -188,3 +187,65 @@ If you use a custom monolog format, adjust this pattern to your needs.
188187
189188This is the date format that will be used to format the date in frontend.
190189<br><br>
190+
191+ # ## hosts
192+
193+ **type**: `array<string, mixed>`
194+
195+ This entry allows you to add more hosts to the log viewer
196+
197+ **Full example:**
198+ ` ` ` yaml
199+ hosts:
200+ local:
201+ name: Local
202+ host: null
203+ remote:
204+ name: Remote
205+ host: https://example.com/log-viewer
206+ auth:
207+ type: basic
208+ options:
209+ username: user
210+ password: pass
211+ ` ` `
212+ <br>
213+
214+ # ## hosts.name
215+
216+ **type**: `string`
217+
218+ The display name of the host. Will be shown in the UI host selector.
219+ <br><br>
220+
221+ # ## hosts.host
222+
223+ **type**: `string|null`
224+
225+ The url to the remote host log-viewer API. If null, the local host will be used. Must include the log-viewer route prefix.
226+ Example : ` host: https://example.com/log-viewer`
227+
228+ # ## hosts.auth
229+
230+ **type**: `array<string, mixed>`
231+
232+ For remote hosts, specifies the authentication method.
233+ <br><br>
234+
235+ # ## hosts.auth.type
236+
237+ **type**: `string` (`enum: basic|bearer|header|class-string`)
238+
239+ The remote host authentication method :
240+
241+ - `basic` : Basic authentication. Requires `username` and `password` option.
242+ - `bearer` : Bearer token authentication. Requires `token` option.
243+ - `header` : Custom header authentication. The key-values in the options will be added to the request headers.
244+ - `class-string` : Custom authentication. The class must implement `FD\LogViewerBundle\Authentication\AuthenticationInterface`.
245+ <br><br>
246+
247+ # ## hosts.auth.options
248+
249+ **type**: `array<string, string>`
250+ The options specific for the authentication method.
251+ <br><br>
0 commit comments