Git Product home page Git Product logo

Comments (1)

gconnell avatar gconnell commented on May 19, 2024

These all appear to be coming from stenotype, so my guess is it's because of the fact that we pass a syslog Logger into stenotype as STDOUT/STDERR. In stenographer.go:

logwriter, err := syslog.New(syslog.LOG_USER|syslog.LOG_INFO, "stenographer")
...
stenotypeOutput = logwriter // for stenotype
...
env.StenotypeOutput = stenotypeOutput

In env/env.go:

cmd.Stdout = d.StenotypeOutput
cmd.Stderr = d.StenotypeOutput

We've got C writing to stderr, and (correctly) flusing after each write using flush here in util.h:

~LogLine() {
  ss_ << "\n";
  std::cerr << ss_.str() << std::flush;

But that flushes into STDERR, which Go picks up and tries to pipe into the syslog logwriter. It uses an os.Pipe for this that it created with writerDescriptor. I expect it's this pipe that, in certain circumstances, buffers two lines together into a single Write call to the syslog writer.

from stenographer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.