title: Google Apps Script: How to fix "Truncating output" error when processing text from a cell as imput?
body: <p>I have a Google Apps Script function which I want to use to do this: extract some data (a date) from a raw text in a spreadsheet cell. When I use a javascript IDE, the code works fine. But when I try it on GAS, it doesn't work.</p>
  
  <p>This is the code:</p>
  
  <pre><code>function findDate (text){
  text1 = text.split(".Date");
  Logger.log("text1", text1);
  //console.log("text1= ", text1);
  date = 'no date informed';
  
  for (var i=0; i&lt;text1.length; i++) {
       text2 = text1[i].split(" ");
       Logger.log("text2", text2);
  //     console.log("text2= ", text2);
    //   console.log("text2[1]= ", text2[1]);
       if (text2[1] === 'common:'){
           date = text2[2];
         Logger.log("text2[2]", text2[2]);
  //         console.log("text2[2]= ", text2[2]);
  
       }
    }
    return date;
  }
  </code></pre>
  
  <p>The string which is in the spreadsheet cell is not exactly this, it's writen in another language, but it's similar to this (broken text, but without the space between lines):</p>
  
  <p>special term: 19 years, 6 months and 0 days.</p>
  
  <p>commom term: 8 years, 8 months and 0 days.</p>
  
  <p>Date special: 23/11/1998</p>
  
  <p>Date common: 09/11/2012</p>
  
  <p>When I get the logs, I got the message <code>Logging output too large. Truncating output.</code> and this text:</p>
  
  <p><code>[text1, [[special term: 19 years, 6 months and 0 days.
  commom term: 8 years, 8 months and 0 days.
  Date special: 23/11/1998
  Date commom: 09/11/2012]]]</code></p>
  
  <p>THANKS in advance for any help!</p>