PLT-5906 Set logs path instead log filename (#5949)

* PLT-5906 Set logs path instead log filename

* feedback review
This commit is contained in:
enahum
2017-04-04 18:13:31 +01:00
committed by George Goldberg
parent ac0c7e30ca
commit 0b5c0794fd
3 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -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
}
}
@@ -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}
+2 -2
View File
@@ -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",