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.

400 lines
17 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.db_config"}}
  90. </h4>
  91. <div class="ui attached table segment">
  92. <dl class="dl-horizontal admin-dl-horizontal">
  93. <dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
  94. <dd>{{.DbCfg.Type}}</dd>
  95. {{if not (or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb"))}}
  96. <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
  97. <dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
  98. <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
  99. <dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
  100. <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
  101. <dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
  102. {{end}}
  103. {{if eq .DbCfg.Type "postgres"}}
  104. <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
  105. <dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
  106. {{end}}
  107. {{if or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb")}}
  108. <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
  109. <dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
  110. {{end}}
  111. </dl>
  112. </div>
  113. <h4 class="ui top attached header">
  114. {{.i18n.Tr "admin.config.service_config"}}
  115. </h4>
  116. <div class="ui attached table segment">
  117. <dl class="dl-horizontal admin-dl-horizontal">
  118. <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
  119. <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
  120. <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
  121. <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  122. <dt>{{.i18n.Tr "admin.config.allow_only_external_registration"}}</dt>
  123. <dd><i class="fa fa{{if .Service.AllowOnlyExternalRegistration}}-check{{end}}-square-o"></i></dd>
  124. <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
  125. <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
  126. <dt>{{.i18n.Tr "admin.config.enable_openid_signup"}}</dt>
  127. <dd><i class="fa fa{{if .Service.EnableOpenIDSignUp}}-check{{end}}-square-o"></i></dd>
  128. <dt>{{.i18n.Tr "admin.config.enable_openid_signin"}}</dt>
  129. <dd><i class="fa fa{{if .Service.EnableOpenIDSignIn}}-check{{end}}-square-o"></i></dd>
  130. <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
  131. <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
  132. <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
  133. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  134. {{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
  135. <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
  136. <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
  137. <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
  138. <dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
  139. <dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
  140. <dt>{{.i18n.Tr "admin.config.default_allow_create_organization"}}</dt>
  141. <dd><i class="fa fa{{if .Service.DefaultAllowCreateOrganization}}-check{{end}}-square-o"></i></dd>
  142. <dt>{{.i18n.Tr "admin.config.enable_timetracking"}}</dt>
  143. <dd><i class="fa fa{{if .Service.EnableTimetracking}}-check{{end}}-square-o"></i></dd>
  144. {{if .Service.EnableTimetracking}}
  145. <dt>{{.i18n.Tr "admin.config.default_enable_timetracking"}}</dt>
  146. <dd><i class="fa fa{{if .Service.DefaultEnableTimetracking}}-check{{end}}-square-o"></i></dd>
  147. <dt>{{.i18n.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
  148. <dd><i class="fa fa{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}-check{{end}}-square-o"></i></dd>
  149. {{end}}
  150. <dt>{{.i18n.Tr "admin.config.default_visibility_organization"}}</dt>
  151. <dd>{{.Service.DefaultOrgVisibility}}</dd>
  152. <dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
  153. <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
  154. <dt>{{.i18n.Tr "admin.config.default_enable_dependencies"}}</dt>
  155. <dd><i class="fa fa{{if .Service.DefaultEnableDependencies}}-check{{end}}-square-o"></i></dd>
  156. <div class="ui divider"></div>
  157. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  158. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  159. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  160. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  161. </dl>
  162. </div>
  163. <h4 class="ui top attached header">
  164. {{.i18n.Tr "admin.config.webhook_config"}}
  165. </h4>
  166. <div class="ui attached table segment">
  167. <dl class="dl-horizontal admin-dl-horizontal">
  168. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  169. <dd>{{.Webhook.QueueLength}}</dd>
  170. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  171. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  172. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  173. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  174. </dl>
  175. </div>
  176. <h4 class="ui top attached header">
  177. {{.i18n.Tr "admin.config.mailer_config"}}
  178. </h4>
  179. <div class="ui attached table segment">
  180. <dl class="dl-horizontal admin-dl-horizontal">
  181. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  182. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  183. {{if .MailerEnabled}}
  184. <dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
  185. <dd>{{.Mailer.Name}}</dd>
  186. {{if eq .Mailer.MailerType "smtp"}}
  187. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  188. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  189. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  190. <dd>{{.Mailer.Host}}</dd>
  191. {{else if eq .Mailer.MailerType "sendmail"}}
  192. <dt>{{.i18n.Tr "admin.config.mailer_use_sendmail"}}</dt>
  193. <dd><i class="fa fa-check-square-o"></i></dd>
  194. <dt>{{.i18n.Tr "admin.config.mailer_sendmail_path"}}</dt>
  195. <dd>{{.Mailer.SendmailPath}}</dd>
  196. <dt>{{.i18n.Tr "admin.config.mailer_sendmail_args"}}</dt>
  197. <dd>{{.Mailer.SendmailArgs}}</dd>
  198. {{end}}
  199. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  200. <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
  201. <form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
  202. {{.CsrfTokenHtml}}
  203. <div class="inline field ui left">
  204. <div class="ui input">
  205. <input type="email" name="email" required>
  206. </div>
  207. </div>
  208. <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
  209. </form>
  210. {{end}}
  211. </dl>
  212. </div>
  213. <h4 class="ui top attached header">
  214. {{.i18n.Tr "admin.config.cache_config"}}
  215. </h4>
  216. <div class="ui attached table segment">
  217. <dl class="dl-horizontal admin-dl-horizontal">
  218. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  219. <dd>{{.CacheAdapter}}</dd>
  220. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  221. <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  222. {{if .CacheConn}}
  223. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  224. <dd><code>{{.CacheConn}}</code></dd>
  225. {{end}}
  226. </dl>
  227. </div>
  228. <h4 class="ui top attached header">
  229. {{.i18n.Tr "admin.config.session_config"}}
  230. </h4>
  231. <div class="ui attached table segment">
  232. <dl class="dl-horizontal admin-dl-horizontal">
  233. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  234. <dd>{{.SessionConfig.Provider}}</dd>
  235. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  236. <dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
  237. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  238. <dd>{{.SessionConfig.CookieName}}</dd>
  239. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  240. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  241. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  242. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  243. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  244. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  245. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  246. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  247. </dl>
  248. </div>
  249. <h4 class="ui top attached header">
  250. {{.i18n.Tr "admin.config.picture_config"}}
  251. </h4>
  252. <div class="ui attached table segment">
  253. <dl class="dl-horizontal admin-dl-horizontal">
  254. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  255. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  256. <div class="ui divider"></div>
  257. <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
  258. <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
  259. </dl>
  260. </div>
  261. <h4 class="ui top attached header">
  262. {{.i18n.Tr "admin.config.git_config"}}
  263. </h4>
  264. <div class="ui attached table segment">
  265. <dl class="dl-horizontal admin-dl-horizontal">
  266. <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
  267. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  268. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  269. <dd>{{.Git.MaxGitDiffLines}}</dd>
  270. <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
  271. <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
  272. <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
  273. <dd>{{.Git.MaxGitDiffFiles}}</dd>
  274. <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
  275. <dd><code>{{.Git.GCArgs}}</code></dd>
  276. <div class="ui divider"></div>
  277. <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
  278. <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  279. <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
  280. <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  281. <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
  282. <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  283. <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
  284. <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  285. <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
  286. <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  287. </dl>
  288. </div>
  289. <h4 class="ui top attached header">
  290. {{.i18n.Tr "admin.config.log_config"}}
  291. </h4>
  292. <div class="ui attached table segment">
  293. <dl class="dl-horizontal admin-dl-horizontal">
  294. {{range .Loggers.default.SubLogDescriptions}}
  295. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  296. <dd>{{.Name}} ({{.Provider}})</dd>
  297. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  298. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  299. {{end}}
  300. <div class="ui divider"></div>
  301. <dt>{{$.i18n.Tr "admin.config.macaron_log_mode"}}</dt>
  302. {{if .RedirectMacaronLog}}
  303. {{if .Loggers.macaron.SubLogDescriptions}}
  304. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  305. {{range .Loggers.macaron.SubLogDescriptions}}
  306. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  307. <dd>{{.Name}} ({{.Provider}})</dd>
  308. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  309. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  310. {{end}}
  311. {{else}}
  312. <dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
  313. {{end}}
  314. {{else}}
  315. <dd>{{$.i18n.Tr "admin.config.go_log"}}</dd>
  316. {{end}}
  317. <div class="ui divider"></div>
  318. <dt>{{$.i18n.Tr "admin.config.router_log_mode"}}</dt>
  319. {{if .DisableRouterLog}}
  320. <dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
  321. {{else}}
  322. {{if .RedirectMacaronLog}}
  323. {{if .Loggers.router.SubLogDescriptions}}
  324. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  325. {{range .Loggers.router.SubLogDescriptions}}
  326. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  327. <dd>{{.Name}} ({{.Provider}})</dd>
  328. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  329. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  330. {{end}}
  331. {{else}}
  332. <dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
  333. {{end}}
  334. {{else}}
  335. <dd>{{$.i18n.Tr "admin.config.go_log"}}</dd>
  336. {{end}}
  337. {{end}}
  338. <div class="ui divider"></div>
  339. <dt>{{$.i18n.Tr "admin.config.access_log_mode"}}</dt>
  340. {{if .EnableAccessLog}}
  341. {{if .Loggers.access.SubLogDescriptions}}
  342. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  343. {{range .Loggers.access.SubLogDescriptions}}
  344. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  345. <dd>{{.Name}} ({{.Provider}})</dd>
  346. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  347. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  348. {{end}}
  349. {{else}}
  350. <dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
  351. {{end}}
  352. <dt>{{$.i18n.Tr "admin.config.access_log_template"}}</dt>
  353. <dd><code>{{$.AccessLogTemplate}}</code></dd>
  354. {{else}}
  355. <dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
  356. {{end}}
  357. <div class="ui divider"></div>
  358. <dt>{{$.i18n.Tr "admin.config.xorm_log_mode"}}</dt>
  359. {{if .EnableXORMLog}}
  360. {{if .Loggers.xorm.SubLogDescriptions}}
  361. <dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
  362. {{range .Loggers.xorm.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.xorm_log_sql"}}</dt>
  372. <dd><i class="fa fa{{if $.LogSQL}}-check{{end}}-square-o"></i></dd>
  373. {{else}}
  374. <dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
  375. {{end}}
  376. </dl>
  377. </div>
  378. </div>
  379. </div>
  380. {{template "base/footer" .}}