title: Golang: Does logging into file using log.Println takes care of concurrent access
body: <p>I have hundreds of subroutines writing into log file using log.Println() <br>
  I am using log.Println to write into error.log file. <br></p>
  
  <pre><code>func main() {
    e, err := os.OpenFile("error.log", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666)
    if err != nil {
      fmt.Printf("error opening file: %v", err)
      os.Exit(1)
    }
    defer e.Close()
    errLog := log.New(e, "&gt;&gt;&gt;", log.Ldate|log.Ltime)
  
    for i:=0; i&lt;500; i++ {
        go worker(errLog)
    }
  }
  
  func worker(errLog log.Logger) {
    // Do some work 
    errLog.Println("Hello world!!!")
  }
  </code></pre>
  
  <p>Is my approach correct ? Or should I use channel to make sure only one process is logging into file at one time or is it taken care of inherently by log package?</p>
  
  <p>Also does log package takes care of buffering or it directly writes into file?</p>