Skip to content

Commit

Permalink
Add installation_source configuration setting and log it on startup
Browse files Browse the repository at this point in the history
Closes #1530

(cherry picked from commit 5d6169c)
  • Loading branch information
Jochen Schalanda authored and bernd committed Nov 11, 2015
1 parent 99d3e24 commit 59babe0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Expand Up @@ -74,7 +74,8 @@ public boolean isNoPidFile() {

@Override
protected void startCommand() {
LOG.info("Graylog " + commandName + " {} starting up. (JRE: {})", version, Tools.getSystemInformation());
LOG.info("Graylog {} {} starting up (JRE: {}, installed from: {})", commandName, version,
Tools.getSystemInformation(), configuration.getInstallationSource());

// Do not use a PID file if the user requested not to
if (!isNoPidFile()) {
Expand Down
Expand Up @@ -27,6 +27,7 @@
import com.github.joschi.jadconfig.validators.InetPortValidator;
import com.github.joschi.jadconfig.validators.PositiveDurationValidator;
import com.github.joschi.jadconfig.validators.PositiveIntegerValidator;
import com.github.joschi.jadconfig.validators.StringNotBlankValidator;
import com.lmax.disruptor.BlockingWaitStrategy;
import com.lmax.disruptor.BusySpinWaitStrategy;
import com.lmax.disruptor.SleepingWaitStrategy;
Expand Down Expand Up @@ -131,6 +132,9 @@ public abstract class BaseConfiguration {
@Parameter(value = "http_read_timeout", validator = PositiveDurationValidator.class)
private Duration httpReadTimeout = Duration.seconds(10L);

@Parameter(value = "installation_source", validator = StringNotBlankValidator.class)
private String installationSource = "unknown";

public String getRestUriScheme() {
return isRestEnableTls() ? "https" : "http";
}
Expand Down Expand Up @@ -305,4 +309,8 @@ public Duration getHttpWriteTimeout() {
public Duration getHttpReadTimeout() {
return httpReadTimeout;
}

public String getInstallationSource() {
return installationSource;
}
}

0 comments on commit 59babe0

Please sign in to comment.