Skip to content

Commit 0cd87d6

Browse files
authored
Update docs and comments to remove macaron (#14491)
1 parent 25b6255 commit 0cd87d6

29 files changed

+32
-78
lines changed

custom/conf/app.example.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,6 @@ ROOT_PATH =
863863
MODE = console
864864
; Buffer length of the channel, keep it as it is if you don't know what it is.
865865
BUFFER_LEN = 10000
866-
REDIRECT_MACARON_LOG = false
867-
MACARON = file
868866
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info"
869867
ROUTER_LOG_LEVEL = Info
870868
ROUTER = console

docker/root/etc/templates/app.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ PATH = /data/gitea/attachments
4747
[log]
4848
MODE = console
4949
LEVEL = info
50-
REDIRECT_MACARON_LOG = true
51-
MACARON = console
5250
ROUTER = console
5351
ROOT_PATH = /data/gitea/log
5452

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ Default templates for project boards:
611611
- `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
612612
- `ROUTER_LOG_LEVEL`: **Info**: The log level that the router should log at. (If you are setting the access log, its recommended to place this at Debug.)
613613
- `ROUTER`: **console**: The mode or name of the log the router should log to. (If you set this to `,` it will log to default gitea logger.)
614-
NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`.
614+
NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`.
615615
- `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template
616616
- `ACCESS`: **file**: Logging mode for the access logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.access\]`. By default the file mode will log to `$ROOT_PATH/access.log`. (If you set this to `,` it will log to the default gitea logger.)
617617
- `ACCESS_LOG_TEMPLATE`: **`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**: Sets the template used to create the access log.

docs/content/doc/advanced/environment-variables.en-us.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,6 @@ For documentation about each of the variables available, refer to the
5858
- `HOMEDRIVE`: Main drive path used to access the home directory (C:)
5959
- `HOMEPATH`: Home relative path in the given home drive path
6060

61-
## Macaron (framework used by Gitea)
62-
63-
- `HOST`: Host Macaron will listen on
64-
- `PORT`: Port Macaron will listen on
65-
- `MACARON_ENV`: global variable to provide special functionality for development environments
66-
vs. production environments. If MACARON_ENV is set to "" or "development", then templates will
67-
be recompiled on every request. For more performance, set the MACARON_ENV environment variable
68-
to "production".
69-
7061
## Miscellaneous
7162

7263
- `SKIP_MINWINSVC`: If set to 1, do not run as a service on Windows.

docs/content/doc/advanced/environment-variables.zh-cn.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ GITEA_CUSTOM=/home/gitea/custom ./gitea web
5050
* `HOMEDRIVE`: 用于访问 home 目录的主驱动器路径(C盘)
5151
* `HOMEPATH`:在指定主驱动器下的 home 目录相对路径
5252

53-
## Macaron(Gitea 使用的 web 框架)
54-
55-
* `HOST`:Macaron 监听的主机地址
56-
* `PORT`:Macaron 监听的端口地址
57-
* `MACARON_ENV`:为开发环境和生产环境提供特殊功能性配置的全局变量,当 MACARON_ENV 设置为 "" 或 "development"
58-
时,每次请求都会重编译页面模板。为了提高性能表现,可将它设置为 "production"。
59-
6053
## Miscellaneous
6154

6255
* `SKIP_MINWINSVC`:如果设置为 1,在 Windows 上不会以 service 的形式运行。

docs/content/doc/advanced/logging-documentation.en-us.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ The fundamental thing to be aware of in Gitea is that there are several
2727
log groups:
2828

2929
- The "Default" logger
30-
- The Macaron logger
3130
- The Router logger
3231
- The Access logger
3332
- The XORM logger
@@ -74,8 +73,7 @@ You can disable Router log by setting `DISABLE_ROUTER_LOG`.
7473
You can configure the outputs of this
7574
router log by setting the `ROUTER` value in the `[log]` section of the
7675
configuration. `ROUTER` will default to `console` if unset. The Gitea
77-
Router logs the same data as the Macaron log but has slightly different
78-
coloring. It logs at the `Info` level by default, but this can be
76+
Router logs at the `Info` level by default, but this can be
7977
changed if desired by setting the `ROUTER_LOG_LEVEL` value.
8078

8179
Please note, setting the `LEVEL` of this logger to a level above
@@ -182,7 +180,7 @@ Certain configuration is common to all modes of log output:
182180
- `STACKTRACE_LEVEL` is the lowest level that this output will print
183181
a stacktrace. This value is inherited.
184182
- `MODE` is the mode of the log output. It will default to the sublogger
185-
name. Thus `[log.console.macaron]` will default to `MODE = console`.
183+
name. Thus `[log.console.router]` will default to `MODE = console`.
186184
- `COLORIZE` will default to `true` for `console` as
187185
described, otherwise it will default to `false`.
188186

@@ -280,8 +278,6 @@ LOG_SQL = false ; SQL logs are rarely helpful unless we specifically ask for the
280278
[log]
281279
MODE = console
282280
LEVEL = debug ; please set the level to debug when we are debugging a problem
283-
REDIRECT_MACARON_LOG = true
284-
MACARON = console
285281
ROUTER = console
286282
COLORIZE = false ; this can be true if you can strip out the ansi coloring
287283
```
@@ -314,7 +310,6 @@ ROOT_PATH = %(GITEA_WORK_DIR)/log
314310
MODE = console
315311
LEVEL = Info
316312
STACKTRACE_LEVEL = None
317-
REDIRECT_MACARON_LOG = false
318313
ENABLE_ACCESS_LOG = false
319314
ENABLE_XORM_LOG = true
320315
XORM = ,
@@ -345,7 +340,7 @@ recommended that pausing only done for a very short period of time.
345340
## Adding and removing logging whilst Gitea is running
346341

347342
It is possible to add and remove logging whilst Gitea is running using the `gitea manager logging add` and `remove` subcommands.
348-
This functionality can only adjust running log systems and cannot be used to start the access, macaron or router loggers if they
343+
This functionality can only adjust running log systems and cannot be used to start the access or router loggers if they
349344
were not already initialised. If you wish to start these systems you are advised to adjust the app.ini and (gracefully) restart
350345
the Gitea service.
351346

integrations/mssql.ini.tmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ PROVIDER_CONFIG = integrations/gitea-integration-mssql/data/sessions
7878
[log]
7979
MODE = test,file
8080
ROOT_PATH = mssql-log
81-
REDIRECT_MACARON_LOG = true
8281
ROUTER = ,
83-
MACARON = ,
8482
XORM = file
8583

8684
[log.test]

integrations/mysql.ini.tmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ PROVIDER_CONFIG = integrations/gitea-integration-mysql/data/sessions
9797
[log]
9898
MODE = test,file
9999
ROOT_PATH = mysql-log
100-
REDIRECT_MACARON_LOG = true
101100
ROUTER = ,
102-
MACARON = ,
103101
XORM = file
104102

105103
[log.test]

integrations/mysql8.ini.tmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ PROVIDER_CONFIG = data/sessions-mysql8
7070
[log]
7171
MODE = test,file
7272
ROOT_PATH = mysql8-log
73-
REDIRECT_MACARON_LOG = true
7473
ROUTER = ,
75-
MACARON = ,
7674
XORM = file
7775

7876
[log.test]

integrations/oauth_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func TestRefreshTokenInvalidation(t *testing.T) {
235235
"redirect_uri": "a",
236236
"refresh_token": parsed.RefreshToken,
237237
})
238-
// tip: Why this changed, because macaron will set req.Body back when consume the req but chi will not.
238+
239239
bs, err := ioutil.ReadAll(refreshReq.Body)
240240
assert.NoError(t, err)
241241

0 commit comments

Comments
 (0)