Git Product home page Git Product logo

docker-pino-sample's People

Contributors

mattiash avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-pino-sample's Issues

Does not work with node:12-alpine image

This is not necessarily an issue, just looking for some clarification on a few things based on my specific setup.

I'm using the node:12.18.0-alpine image and noticed that the entrypoint.sh script doesn't work, it produces the following error: "env: can't execute 'bash': No such file or directory"

Changing the header of the script to #!/bin/sh get it to execute the script, but it errors on L18: "bin/sh syntax error: unexpected redirection". Seems like the redirection on L18 of entrypoint.sh is a feature specifically available in bash and not in sh.

I'm curious what the > > is doing in this command - I've used single > in commands before when sending output of a script to a file for example, but haven't seen double with a space like this before...

node build/index.js > >(./node_modules/.bin/pino-pretty -t) &

I noticed that pino recommends here in their docs to use pipe | to offload the transport to a separate process from the main node app. Does < < redirection have the same effect, but additionally allow for catching of the SIGTERM and ability to pass it along to the node process?

I.e. i'm wondering if there would be any performance difference between this command:

node build/app.js | node build/utils/logTransport.js

and:

node build/app.js > >(node build/utils/logTransport.js) &
worker="$!"

Note: in the example above logTransport.js is a custom log formatter, doing a similar job to pino-pretty in the example in this repo.

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.