You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

420 lines
18 KiB

Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
  1. {{template "base/head" .}}
  2. <div class="admin config">
  3. {{template "admin/navbar" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h4 class="ui top attached header">
  7. {{.i18n.Tr "admin.config.server_config"}}
  8. </h4>
  9. <div class="ui attached table segment">
  10. <dl class="dl-horizontal admin-dl-horizontal">
  11. <dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
  12. <dd>{{AppName}}</dd>
  13. <dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
  14. <dd>{{AppVer}}{{AppBuiltWith}}</dd>
  15. <dt>{{.i18n.Tr "admin.config.custom_conf"}}</dt>
  16. <dd>{{.CustomConf}}</dd>
  17. <dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
  18. <dd>{{.AppUrl}}</dd>
  19. <dt>{{.i18n.Tr "admin.config.domain"}}</dt>
  20. <dd>{{.Domain}}</dd>
  21. <dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
  22. <dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
  23. <dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
  24. <dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
  25. <div class="ui divider"></div>
  26. <dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
  27. <dd>{{.RunUser}}</dd>
  28. <dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
  29. <dd>{{.RunMode}}</dd>
  30. <div class="ui divider"></div>
  31. <dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
  32. <dd>{{.GitVersion}}</dd>
  33. <div class="ui divider"></div>
  34. <dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
  35. <dd>{{.RepoRootPath}}</dd>
  36. <dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
  37. <dd>{{.StaticRootPath}}</dd>
  38. <dt>{{.i18n.Tr "admin.config.custom_file_root_path"}}</dt>
  39. <dd>{{.CustomRootPath}}</dd>
  40. <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
  41. <dd>{{.LogRootPath}}</dd>
  42. <dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
  43. <dd>{{.ScriptType}}</dd>
  44. <dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
  45. <dd>{{.ReverseProxyAuthUser}}</dd>
  46. {{if .EnvVars }}
  47. <div class="ui divider"></div>
  48. {{range .EnvVars}}
  49. <dt>{{.Name}}</dt>
  50. <dd>{{.Value}}</dd>
  51. {{end}}
  52. {{end}}
  53. </dl>
  54. </div>
  55. <h4 class="ui top attached header">
  56. {{.i18n.Tr "admin.config.ssh_config"}}
  57. </h4>
  58. <div class="ui attached table segment">
  59. <dl class="dl-horizontal admin-dl-horizontal">
  60. <dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
  61. <dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
  62. {{if not .SSH.Disabled}}
  63. <dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
  64. <dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
  65. <dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
  66. <dd>{{.SSH.Domain}}</dd>
  67. <dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
  68. <dd>{{.SSH.Port}}</dd>
  69. <dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
  70. <dd>{{.SSH.ListenPort}}</dd>
  71. {{if not .SSH.StartBuiltinServer}}
  72. <dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
  73. <dd>{{.SSH.RootPath}}</dd>
  74. <dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
  75. <dd>{{.SSH.KeyTestPath}}</dd>
  76. <dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
  77. <dd>{{.SSH.KeygenPath}}</dd>
  78. <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
  79. <dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
  80. {{if .SSH.MinimumKeySizeCheck}}
  81. <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
  82. <dd>{{.SSH.MinimumKeySizes}}</dd>
  83. {{end}}
  84. {{end}}
  85. {{end}}
  86. </dl>
  87. </div>
  88. <h4 class="ui top attached header">
  89. {{.i18n.Tr "admin.config.lfs_config"}}
  90. </h4>
  91. <div class="ui attached table segment">
  92. <dl class="dl-horizontal admin-dl-horizontal">
  93. <dt>{{.i18n.Tr "admin.config.lfs_enabled"}}</dt>
  94. <dd><i class="fa fa{{if .LFS.StartServer}}-check{{end}}-square-o"></i></dd>
  95. {{if .LFS.StartServer}}
  96. <dt>{{.i18n.Tr "admin.config.lfs_content_path"}}</dt>
  97. <dd>{{.LFS.ContentPath}}</dd>
  98. <dt>{{.i18n.Tr "admin.config.lfs_http_auth_expiry"}}</dt>
  99. <dd>{{.LFS.HTTPAuthExpiry}}</dd>
  100. {{end}}
  101. </dl>
  102. </div>
  103. <h4 class="ui top attached header">
  104. {{.i18n.Tr "admin.config.db_config"}}
  105. </h4>
  106. <div class="ui attached table segment">
  107. <dl class="dl-horizontal admin-dl-horizontal">
  108. <dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
  109. <dd>{{.DbCfg.Type}}</dd>
  110. {{if not (or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb"))}}
  111. <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
  112. <dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
  113. <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
  114. <dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
  115. <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
  116. <dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
  117. {{end}}
  118. {{if eq .DbCfg.Type "postgres"}}
  119. <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
  120. <dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
  121. {{end}}
  122. {{if or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb")}}
  123. <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
  124. <dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
  125. {{end}}
  126. </dl>
  127. </div>
  128. <h4 class="ui top attached header">
  129. {{.i18n.Tr "admin.config.service_config"}}
  130. </h4>
  131. <div class="ui attached table segment">
  132. <dl class="dl-horizontal admin-dl-horizontal">
  133. <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
  134. <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
  135. <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
  136. <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  137. <dt>{{.i18n.Tr "admin.config.allow_only_external_registration"}}</dt>
  138. <dd><i class="fa fa{{if .Service.AllowOnlyExternalRegistration}}-check{{end}}-square-o"></i></dd>
  139. <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
  140. <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
  141. <dt>{{.i18n.Tr "admin.config.enable_openid_signup"}}</dt>
  142. <dd><i class="fa fa{{if .Service.EnableOpenIDSignUp}}-check{{end}}-square-o"></i></dd>
  143. <dt>{{.i18n.Tr "admin.config.enable_openid_signin"}}</dt>
  144. <dd><i class="fa fa{{if .Service.EnableOpenIDSignIn}}-check{{end}}-square-o"></i></dd>
  145. <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
  146. <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
  147. <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
  148. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  149. {{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
  150. <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
  151. <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
  152. <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
  153. <dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
  154. <dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
  155. <dt>{{.i18n.Tr "admin.config.default_allow_create_organization"}}</dt>
  156. <dd><i class="fa fa{{if .Service.DefaultAllowCreateOrganization}}-check{{end}}-square-o"></i></dd>
  157. <dt>{{.i18n.Tr "admin.config.enable_timetracking"}}</dt>
  158. <dd><i class="fa fa{{if .Service.EnableTimetracking}}-check{{end}}-square-o"></i></dd>
  159. {{if .Service.EnableTimetracking}}
  160. <dt>{{.i18n.Tr "admin.config.default_enable_timetracking"}}</dt>
  161. <dd><i class="fa fa{{if .Service.DefaultEnableTimetracking}}-check{{end}}-square-o"></i></dd>
  162. <dt>{{.i18n.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
  163. <dd><i class="fa fa{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}-check{{end}}-square-o"></i></dd>
  164. {{end}}
  165. <dt>{{.i18n.Tr "admin.config.default_visibility_organization"}}</dt>
  166. <dd>{{.Service.DefaultOrgVisibility}}</dd>
  167. <dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
  168. <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
  169. <dt>{{.i18n.Tr "admin.config.default_enable_dependencies"}}</dt>
  170. <dd><i class="fa fa{{if .Service.DefaultEnableDependencies}}-check{{end}}-square-o"></i></dd>
  171. <div class="ui divider"></div>
  172. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  173. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  174. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  175. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  176. </dl>
  177. </div>
  178. <h4 class="ui top attached header">
  179. {{.i18n.Tr "admin.config.webhook_config"}}
  180. </h4>
  181. <div class="ui attached table segment">
  182. <dl class="dl-horizontal admin-dl-horizontal">
  183. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  184. <dd>{{.Webhook.QueueLength}}</dd>
  185. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  186. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  187. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  188. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  189. </dl>
  190. </div>
  191. <h4 class="ui top attached header">
  192. {{.i18n.Tr "admin.config.mailer_config"}}
  193. </h4>
  194. <div class="ui attached table segment">
  195. <dl class="dl-horizontal admin-dl-horizontal">
  196. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  197. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  198. {{if .MailerEnabled}}
  199. <dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
  200. <dd>{{.Mailer.Name}}</dd>
  201. {{if eq .Mailer.MailerType "smtp"}}
  202. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  203. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  204. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  205. <dd>{{.Mailer.Host}}</dd>
  206. {{else if eq .Mailer.MailerType "sendmail"}}
  207. <dt>{{.i18n.Tr "admin.config.mailer_use_sendmail"}}</dt>
  208. <dd><i class="fa fa-check-square-o"></i></dd>
  209. <dt>{{.i18n.Tr "admin.config.mailer_sendmail_path"}}</dt>
  210. <dd>{{.Mailer.SendmailPath}}</dd>
  211. <dt>{{.i18n.Tr "admin.config.mailer_sendmail_args"}}</dt>
  212. <dd>{{.Mailer.SendmailArgs}}</dd>
  213. {{end}}
  214. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  215. <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
  216. <form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
  217. {{.CsrfTokenHtml}}
  218. <div class="inline field ui left">
  219. <div class="ui input">
  220. <input type="email" name="email" required>
  221. </div>
  222. </div>
  223. <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
  224. </form>
  225. {{end}}
  226. </dl>
  227. </div>
  228. <h4 class="ui top attached header">
  229. {{.i18n.Tr "admin.config.cache_config"}}
  230. </h4>
  231. <div class="ui attached table segment">
  232. <dl class="dl-horizontal admin-dl-horizontal">
  233. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  234. <dd>{{.CacheAdapter}}</dd>
  235. {{if eq .CacheAdapter "memory"}}
  236. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  237. <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  238. {{end}}
  239. {{if .CacheConn}}
  240. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  241. <dd><code>{{.CacheConn}}</code></dd>
  242. <dt>{{.i18n.Tr "admin.config.cache_item_ttl"}}</dt>
  243. <dd><code>{{.CacheItemTTL}}</code></dd>
  244. {{end}}
  245. </dl>
  246. </div>
  247. <h4 class="ui top attached header">
  248. {{.i18n.Tr "admin.config.session_config"}}
  249. </h4>
  250. <div class="ui attached table segment">
  251. <dl class="dl-horizontal admin-dl-horizontal">
  252. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  253. <dd>{{.SessionConfig.Provider}}</dd>
  254. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  255. <dd><pre>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig | JsonPrettyPrint}}{{else}}-{{end}}</pre></dd>
  256. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  257. <dd>{{.SessionConfig.CookieName}}</dd>
  258. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  259. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  260. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  261. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  262. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  263. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  264. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  265. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  266. </dl>
  267. </div>
  268. <h4 class="ui top attached header">
  269. {{.i18n.Tr "admin.config.picture_config"}}
  270. </h4>
  271. <div class="ui attached table segment">
  272. <dl class="dl-horizontal admin-dl-horizontal">
  273. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  274. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  275. <div class="ui divider"></div>
  276. <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
  277. <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
  278. </dl>
  279. </div>
  280. <h4 class="ui top attached header">
  281. {{.i18n.Tr "admin.config.git_config"}}
  282. </h4>
  283. <div class="ui attached table segment">
  284. <dl class="dl-horizontal admin-dl-horizontal">
  285. <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
  286. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  287. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  288. <dd>{{.Git.MaxGitDiffLines}}</dd>
  289. <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
  290. <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
  291. <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
  292. <dd>{{.Git.MaxGitDiffFiles}}</dd>
  293. <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
  294. <dd><code>{{.Git.GCArgs}}</code></dd>
  295. <div class="ui divider"></div>
  296. <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
  297. <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  298. <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
  299. <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  300. <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
  301. <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  302. <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
  303. <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  304. <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
  305. <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  306. </dl>
  307. </div>
  308. <h4 class="ui top attached header">
  309. {{.i18n.Tr "admin.config.log_config"}}
  310. </h4>
  311. <div class="ui attached table segment">
  312. <dl class="dl-horizontal admin-dl-horizontal">
  313. {{range .Loggers.default.SubLogDescriptions}}
  314. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  315. <dd>{{.Name}} ({{.Provider}})</dd>
  316. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  317. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  318. {{end}}
  319. <div class="ui divider"></div>
  320. <dt>{{$.i18n.Tr "admin.config.macaron_log_mode"}}</dt>
  321. {{if .RedirectMacaronLog}}
  322. {{if .Loggers.macaron.SubLogDescriptions}}
  323. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  324. {{range .Loggers.macaron.SubLogDescriptions}}
  325. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  326. <dd>{{.Name}} ({{.Provider}})</dd>
  327. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  328. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  329. {{end}}
  330. {{else}}
  331. <dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
  332. {{end}}
  333. {{else}}
  334. <dd>{{$.i18n.Tr "admin.config.go_log"}}</dd>
  335. {{end}}
  336. <div class="ui divider"></div>
  337. <dt>{{$.i18n.Tr "admin.config.router_log_mode"}}</dt>
  338. {{if .DisableRouterLog}}
  339. <dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
  340. {{else}}
  341. {{if .RedirectMacaronLog}}
  342. {{if .Loggers.router.SubLogDescriptions}}
  343. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  344. {{range .Loggers.router.SubLogDescriptions}}
  345. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  346. <dd>{{.Name}} ({{.Provider}})</dd>
  347. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  348. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  349. {{end}}
  350. {{else}}
  351. <dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
  352. {{end}}
  353. {{else}}
  354. <dd>{{$.i18n.Tr "admin.config.go_log"}}</dd>
  355. {{end}}
  356. {{end}}
  357. <div class="ui divider"></div>
  358. <dt>{{$.i18n.Tr "admin.config.access_log_mode"}}</dt>
  359. {{if .EnableAccessLog}}
  360. {{if .Loggers.access.SubLogDescriptions}}
  361. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  362. {{range .Loggers.access.SubLogDescriptions}}
  363. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  364. <dd>{{.Name}} ({{.Provider}})</dd>
  365. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  366. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  367. {{end}}
  368. {{else}}
  369. <dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
  370. {{end}}
  371. <dt>{{$.i18n.Tr "admin.config.access_log_template"}}</dt>
  372. <dd><code>{{$.AccessLogTemplate}}</code></dd>
  373. {{else}}
  374. <dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
  375. {{end}}
  376. <div class="ui divider"></div>
  377. <dt>{{$.i18n.Tr "admin.config.xorm_log_mode"}}</dt>
  378. {{if .EnableXORMLog}}
  379. {{if .Loggers.xorm.SubLogDescriptions}}
  380. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  381. {{range .Loggers.xorm.SubLogDescriptions}}
  382. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  383. <dd>{{.Name}} ({{.Provider}})</dd>
  384. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  385. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  386. {{end}}
  387. {{else}}
  388. <dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
  389. {{end}}
  390. <dt>{{$.i18n.Tr "admin.config.xorm_log_sql"}}</dt>
  391. <dd><i class="fa fa{{if $.LogSQL}}-check{{end}}-square-o"></i></dd>
  392. {{else}}
  393. <dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
  394. {{end}}
  395. </dl>
  396. </div>
  397. </div>
  398. </div>
  399. {{template "base/footer" .}}