title: View logs of firebase functions in real time
body: <p>I'm using the firebase functions and it's the first time I use node.</p>
  
  <p>My question is very simple, or so I think.</p>
  
  <p>I create a simple function, where, theoretically, if a new field is added to the database, this function must react.</p>
  
  <p>my code is the following:</p>
  
  <pre><code>const functions = require('firebase-functions');
  
  
  'use strict';
  
  
  exports.newItem = functions.database.ref('/test')
    .onCreate((snapshot, context) =&gt; {
  
  
      snapshot = change.after;
      const val = snapshot.val();
  
      console.log('i´m alive');
  
      return null;
    })
  
  ;
  </code></pre>
  
  <p>I'm looking for where to see if the log that I have inside the "newItem" function is shown or not.</p>
  
  <p>As I read, I use "firebase functions: log" from the console, but this returns previous logs, not real time.</p>
  
  <p>I have also seen the use of: gcloud functions logs read, as I read here.</p>
  
  <p>But this always returns: -bash: gcloud: command not found
  I have installed "gcloud functions", but I'm still lost.</p>
  
  <p>I feel if the question is not very well explained, but in summary, I look for a console where to see the logs in real time, just like it does intelij or android studio with the tab logcat.</p>
  
  <p>I would appreciate an explanation for beginners.</p>
  
  <p>Thanks in advance and greetings.</p>