Skip to content

Commit

Permalink
Merge f047f66 into 6ae3464
Browse files Browse the repository at this point in the history
  • Loading branch information
enahum committed Apr 4, 2017
2 parents 6ae3464 + f047f66 commit c35899f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
MODE_BETA = "beta"
MODE_PROD = "prod"
LOG_ROTATE_SIZE = 10000
LOG_FILENAME = "mattermost.log"
)

var cfgMutex = &sync.Mutex{}
Expand Down Expand Up @@ -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
}
}

Expand Down
4 changes: 2 additions & 2 deletions webapp/components/admin_console/log_settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions webapp/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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: ",
Expand All @@ -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",
Expand Down

0 comments on commit c35899f

Please sign in to comment.