How to use the log.info function in log

To help you get started, we’ve selected a few log examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mihirpathak97 / audius / src / modules / YTDownload.js View on Github external
.on("end", function() {
          // Embed metadata
          if(settings.get('embedMetadata') && spotifyMetadata !== null) {
            const rainbow = require('./rainbowWrapper');
            rainbow.embedMetadata(fileName, spotifyMetadata.spotifyId);
          }
          log.info('YTDownload', 'Download complete for ' + youtubeMetadata.link);
          resolve({
            code: 200,
            message: 'Download complete'
          });
        })
        .saveToFile(fileName);
github dramamine / leftovers-again / src / botinfo.js View on Github external
constructor(path) {
    this.path = path;
    this.metadata = {};

    // note that this instance of the bot is created ONLY for pulling its team
    // string and metadata. this instance is not actually used in battles.
    Log.info('trying to require path:' + path);
    const It = require(path);
    this.bot = new It.default();  // eslint-disable-line

    // metadata location
    try {
      const pkg = path + '/package.json';
      this.metadata = require(pkg);
    } catch (e) {
      // nested try-catch, u mad brah?
      try {
        this.metadata = this.bot.meta;
      } catch (x) {
        Log.error('No metadata found! Expected to find the file in node_path '
         + path);
      }
    }
github mihirpathak97 / audius / src / modules / YTSearch.js View on Github external
let searchVideosByQuery = (query) => {

  log.info('YTSearch', 'Recieved search parameters - ' + query);

  var apiParams = {
    part: 'snippet',
    maxResults: 10,
    q: query,
    key: 'AIzaSyBVqWn_4aUZnAtJXSTyg-WRevZrRK3ctPE',
    type: 'video',
    topicId: '/m/04rlf'
  }

  return new Promise(function(resolve, reject) {
    axios.get('https://www.googleapis.com/youtube/v3/search?' + querystring.stringify(apiParams)).then(response => {
      try {
        var result = response.data;

        // crunch the results into a meaningfull JSON object
github nteract / commuter / backend / index.js View on Github external
.then(server => {
    const port = server.address().port;
    console.log(log);
    log.info("Commuter server listening on port " + port);
  })
  .catch((e: Error) => {
github nteract / nteract / applications / commuter / backend / index.js View on Github external
.then(server => {
    const port = server.address().port;
    log.info("Commuter server listening on port " + port);
  })
  .catch((e: Error) => {