title: Varnish basic config file throws "VCL compilation failed" when I try to use std.syslog. Why?
body: <p>I have a simple VCL file as follows:</p>
  
  <pre><code>vcl 4.0;
  
  import std;
  
  backend default {
      .host = "127.0.0.1";
      .port = "3333";
  }
  
  sub vcl_recv {
      std.log("req.host: "+req.host);
  }
  
  sub vcl_backend_response {
  
  }
  
  sub vcl_deliver {
  
  }
  </code></pre>
  
  <p>When I try to start <code>varnishd</code> with this config on my Mac, I get the following error:</p>
  
  <pre><code>Error:
  Message from VCC-compiler:
  Symbol not found: 'req.host' (expected type STRING):
  ('/Users/jononomo/dev/my_project/deploy/testing.vcl' Line 30 Pos 26)
      std.log("req.host: "+req.host);
  -------------------------########--
  
  ('/Users/jononomo/dev/my_project/deploy/testing.vcl' Line 30 Pos 5) -- ('/Users/jononomo/dev/my_project/deploy/testing.vcl' Line 30 Pos 25)
      std.log("req.host: "+req.host);
  ----#####################----------
  
  Running VCC-compiler failed, exited with 2
  VCL compilation failed
  </code></pre>
  
  <p>I have tried different variations of this line:</p>
  
  <pre><code>std.log("req.host: "+req.host);
  </code></pre>
  
  <p>such as:</p>
  
  <pre><code>std.log(req.host: '+req.host);
  std.log("req.host: ",req.host);
  std.log('req.host: ',req.host);
  std.log('hello');
  </code></pre>
  
  <p>but none of them work.</p>
  
  <p>How can I do simple logging from my VCL file?</p>
  
  <p>Thanks.</p>
  
  <p>UPDATE:  <code>std.log("hello")</code> seems to compile... however, I need to log information about the request object and <code>req</code>, <code>request</code>, etc do not exist.</p>