Commit 6bc9a2f7 authored by Félix Hamel's avatar Félix Hamel

! Fixed messed up streams

parent 092fca78
......@@ -517,13 +517,28 @@ CMBF.prototype.launch = P.method(function(pluginOpts) {
"Loading default foundation plugins: hapi-bunyan",
availablePlugins
);
// Prepare streams
var streams = [
{
level: "info",
stream: process.stdout // log INFO and above to stdout
}
];
if (typeof process.env.LOGDNA_KEY !== "undefined") {
streams.push({
stream: logDNA,
type: "raw"
});
}
return registerPlugin({
register: require("hapi-bunyan"),
options: {
logger: bunyan.createLogger(
_.merge(config.get("server:log", {}), {
name: "cmbf",
stream: formatOut
streams: streams
})
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment