I run a couple of nodejs APPS in cloud foundry on IBM cloud. I wanted to integrate all this in logDNA so I setup a logDNA instance.
1 - I did NOT configure any source as is described in the help (adding agents etc). Still logs started to appear from my cloudant services and my nodejs Apps. System logs apparently. Wondering why... Is the agent by default in the buildpack or something like this?
2 - Now I also wanted to add nodejs APP logs. So I followed: https://github.com/logdna/nodejs and added the following code in my app:
var Logger = require('logdna');
var options = {
//hostname: ,
//logdna_url: "https://logs.eu-de.logging.cloud.ibm.com",
//mac: macAddress,
//env: "Development"
};
const apikey = "MY KEY"; //my REAL key ;-)
var logger = Logger.createLogger(apikey, options);
logger.log('Starting APP');
But I never got any APP logs in the logdna instance. Only the platform logs. I tried many different options, never got it to work.
Any idea anyone?