forked from mirrors/nixpkgs
Merge pull request #51570 from eonpatapon/cassandra-logging
cassandra: add option to configure logging
This commit is contained in:
commit
de30f4e61d
|
@ -34,11 +34,13 @@ let
|
||||||
{ name = "cassandra-etc";
|
{ name = "cassandra-etc";
|
||||||
cassandraYaml = builtins.toJSON cassandraConfigWithAddresses;
|
cassandraYaml = builtins.toJSON cassandraConfigWithAddresses;
|
||||||
cassandraEnvPkg = "${cfg.package}/conf/cassandra-env.sh";
|
cassandraEnvPkg = "${cfg.package}/conf/cassandra-env.sh";
|
||||||
|
cassandraLogbackConfig = pkgs.writeText "logback.xml" cfg.logbackConfig;
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
|
|
||||||
echo "$cassandraYaml" > "$out/cassandra.yaml"
|
echo "$cassandraYaml" > "$out/cassandra.yaml"
|
||||||
ln -s "$cassandraEnvPkg" "$out/cassandra-env.sh"
|
ln -s "$cassandraEnvPkg" "$out/cassandra-env.sh"
|
||||||
|
ln -s "$cassandraLogbackConfig" "$out/logback.xml"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
@ -139,7 +141,27 @@ in {
|
||||||
correspond to a single address, IP aliasing is not supported.
|
correspond to a single address, IP aliasing is not supported.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
logbackConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = ''
|
||||||
|
<configuration scan="false">
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%-5level %date{HH:mm:ss,SSS} %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="STDOUT" />
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<logger name="com.thinkaurelius.thrift" level="ERROR"/>
|
||||||
|
</configuration>
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
XML logback configuration for cassandra
|
||||||
|
'';
|
||||||
|
};
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
default = {};
|
default = {};
|
||||||
|
|
Loading…
Reference in a new issue