-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Can you tell me how can I control the logs generated in our production environment so that observatory does not drive our site dead-slow? What is the most optimized way of saving the logs in observatory?
I have the following code to control the log level in production but it does not help. It is still logging all the logs. What am I doing wrong here?
qlog = Observatory.getToolbox();
if(SITE_URL.search() != -1 || SITE_URL.search(**) != -1) {
console.log("Setting the log level to WARN for *** " + SITE_URL);
var settings = {
maxSeverity: "WARN",
printToConsole: false, // whether to also log to console
logUser: true, // log the user information?
logHttp: true, // log http requests automagically?
logDDP: false, // log DDP requests automagically?
};
Observatory.setSettings(settings);
} else {
console.log("Setting the log level to INFO for localhost " + SITE_URL);
var settings = {
maxSeverity: "INFO",
printToConsole: true, // whether to also log to console
logUser: true, // log the user information?
logHttp: true, // log http requests automagically?
logDDP: false, // log DDP requests automagically?
};
Observatory.setSettings(settings);
}