summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2017-04-04 14:13:31 -0300
committerGeorge Goldberg <george@gberg.me>2017-04-04 18:13:31 +0100
commit0b5c0794fdcbb551c1233dcdfbdf5c7deb585fd6 (patch)
tree8086da27a0424f8c0683f3c112cde198b7490bb6
parentac0c7e30ca0b27a18525a810be107f056bf8e801 (diff)
downloadchat-0b5c0794fdcbb551c1233dcdfbdf5c7deb585fd6.tar.gz
chat-0b5c0794fdcbb551c1233dcdfbdf5c7deb585fd6.tar.bz2
chat-0b5c0794fdcbb551c1233dcdfbdf5c7deb585fd6.zip
PLT-5906 Set logs path instead log filename (#5949)
* PLT-5906 Set logs path instead log filename * feedback review
-rw-r--r--utils/config.go5
-rw-r--r--webapp/components/admin_console/log_settings.jsx4
-rwxr-xr-xwebapp/i18n/en.json4
3 files changed, 7 insertions, 6 deletions
diff --git a/utils/config.go b/utils/config.go
index 23855b0e7..cecc7a361 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -27,6 +27,7 @@ const (
MODE_BETA = "beta"
MODE_PROD = "prod"
LOG_ROTATE_SIZE = 10000
+ LOG_FILENAME = "mattermost.log"
)
var cfgMutex = &sync.Mutex{}
@@ -136,9 +137,9 @@ func configureLog(s *model.LogSettings) {
func GetLogFileLocation(fileLocation string) string {
if fileLocation == "" {
- return FindDir("logs") + "mattermost.log"
+ return FindDir("logs") + LOG_FILENAME
} else {
- return fileLocation
+ return fileLocation + LOG_FILENAME
}
}
diff --git a/webapp/components/admin_console/log_settings.jsx b/webapp/components/admin_console/log_settings.jsx
index 69dd4eda7..e18cb8a23 100644
--- a/webapp/components/admin_console/log_settings.jsx
+++ b/webapp/components/admin_console/log_settings.jsx
@@ -112,7 +112,7 @@ export default class LogSettings extends AdminSettings {
helpText={
<FormattedMessage
id='admin.log.fileDescription'
- defaultMessage='Typically set to true in production. When true, log files are written to the log file specified in file location field below.'
+ defaultMessage='Typically set to true in production. When true, logged events are written to the mattermost.log file in the directory specified in the File Log Directory field. The logs are rotated at 10,000 lines and archived to a file in the same directory, and given a name with a datestamp and serial number. For example, mattermost.2017-03-31.001.'
/>
}
value={this.state.enableFile}
@@ -149,7 +149,7 @@ export default class LogSettings extends AdminSettings {
helpText={
<FormattedMessage
id='admin.log.locationDescription'
- defaultMessage='File to which log files are written. If blank, will be set to ./logs/mattermost, which writes logs to mattermost.log. Log rotation is enabled and every 10,000 lines of log information is written to new files stored in the same directory, for example mattermost.2015-09-23.001, mattermost.2015-09-23.002, and so forth.'
+ defaultMessage='The location of the log files. If blank, they are stored in the ./logs directory. The path that you set must exist and Mattermost must have write permissions in it.'
/>
}
value={this.state.fileLocation}
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index 96c330963..65ca9d1d4 100755
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -506,7 +506,7 @@
"admin.log.enableDiagnosticsDescription": "Enable this feature to improve the quality and performance of Mattermost by sending error reporting and diagnostic information to Mattermost, Inc. Read our <a href=\"https://about.mattermost.com/default-privacy-policy/\" target='_blank'>privacy policy</a> to learn more.",
"admin.log.enableWebhookDebugging": "Enable Webhook Debugging:",
"admin.log.enableWebhookDebuggingDescription": "You can set this to false to disable the debug logging of all incoming webhook request bodies.",
- "admin.log.fileDescription": "Typically set to true in production. When true, log files are written to the log file specified in file location field below.",
+ "admin.log.fileDescription": "Typically set to true in production. When true, logged events are written to the mattermost.log file in the directory specified in the File Log Directory field. The logs are rotated at 10,000 lines and archived to a file in the same directory, and given a name with a datestamp and serial number. For example, mattermost.2017-03-31.001.",
"admin.log.fileLevelDescription": "This setting determines the level of detail at which log events are written to the log file. ERROR: Outputs only error messages. INFO: Outputs error messages and information around startup and initialization. DEBUG: Prints high detail for developers working on debugging issues.",
"admin.log.fileLevelTitle": "File Log Level:",
"admin.log.fileTitle": "Output logs to file: ",
@@ -521,7 +521,7 @@
"admin.log.formatTitle": "File Log Format:",
"admin.log.levelDescription": "This setting determines the level of detail at which log events are written to the console. ERROR: Outputs only error messages. INFO: Outputs error messages and information around startup and initialization. DEBUG: Prints high detail for developers working on debugging issues.",
"admin.log.levelTitle": "Console Log Level:",
- "admin.log.locationDescription": "File to which log files are written. If blank, will be set to ./logs/mattermost, which writes logs to mattermost.log. Log rotation is enabled and every 10,000 lines of log information is written to new files stored in the same directory, for example mattermost.2015-09-23.001, mattermost.2015-09-23.002, and so forth.",
+ "admin.log.locationDescription": "The location of the log files. If blank, they are stored in the ./logs directory. The path that you set must exist and Mattermost must have write permissions in it.",
"admin.log.locationPlaceholder": "Enter your file location",
"admin.log.locationTitle": "File Log Directory:",
"admin.log.logSettings": "Log Settings",