Update core. Refactor error logging code.

This commit is contained in:
Kleissner
2022-01-12 22:34:21 +01:00
parent 5260dc354e
commit 1a8f4cc7d6
5 changed files with 10 additions and 29 deletions

View File

@@ -21,10 +21,6 @@ var config struct {
// Warning: These settings are currently overwritten (deleted) when the config file is updated by core.
// In the future the core package will consider custom config fields.
// Log settings
ErrorOutput int `yaml:"ErrorOutput"` // 0 = Log file (default), 1 = Command line, 2 = Log file + command line, 3 = None
DebugAPI bool `yaml:"DebugAPI"` // Enables the debug API which allows profiling. Do not enable in production. Only available if compiled with debug tag.
// API settings
APIListen []string `yaml:"APIListen"` // WebListen is in format IP:Port and declares where the web-interface should listen on. IP can also be ommitted to listen on any.
APIUseSSL bool `yaml:"APIUseSSL"` // Enables SSL.
@@ -33,6 +29,7 @@ var config struct {
APITimeoutRead string `yaml:"APITimeoutRead"` // The maximum duration for reading the entire request, including the body.
APITimeoutWrite string `yaml:"APITimeoutWrite"` // The maximum duration before timing out writes of the response. This includes processing time and is therefore the max time any HTTP function may take.
APIKey uuid.UUID `yaml:"APIKey"` // API key. Empty UUID 00000000-0000-0000-0000-000000000000 = not used.
DebugAPI bool `yaml:"DebugAPI"` // Enables the debug API which allows profiling. Do not enable in production. Only available if compiled with debug tag.
}
func init() {
@@ -57,7 +54,6 @@ func main() {
userAgent := appName + "/" + core.Version
filters := &core.Filters{
LogError: logError,
DHTSearchStatus: filterSearchStatus,
IncomingRequest: filterIncomingRequest,
MessageIn: filterMessageIn,