Giter Club home page Giter Club logo

Comments (13)

miyagawa avatar miyagawa commented on July 17, 2024

Out of curiosity what do you want to achieve by enabling that option?

Sent from Mailbox for iPhone

On Tue, Apr 9, 2013 at 3:09 AM, Wallace Reis [email protected]
wrote:

Hi,

I couldn't find any way to set sig_passthrough option for Net::Server out of box. Please advise if there is any known path, otherwise I will be happy to try and do a patch.

Reply to this email directly or view it on GitHub:
#68

from starman.

wreis avatar wreis commented on July 17, 2024

Logfile rotation with logging controlled by Log4perl.

from starman.

miyagawa avatar miyagawa commented on July 17, 2024

OK. Doesn't that require passing log4perl related params as well or could
it be done with the current interrace?

from starman.

wreis avatar wreis commented on July 17, 2024

The log4perl related params in order to have it adding the signal handler for file recreation is processed from its config file - in my case, set from config-file of the application. So, it can be done with the current interface.

from starman.

miyagawa avatar miyagawa commented on July 17, 2024

Just curious, can you show me how? config file of which?

I thought log4perl support is baked in Net::Server but i might be confusing with something else.

from starman.

wreis avatar wreis commented on July 17, 2024

https://metacpan.org/module/Log::Log4perl#Initialize-via-a-configuration-file

with:
log4perl.appender.LOGFILE.recreate: 1
log4perl.appender.LOGFILE.recreate_check_signal: USR1

So, I have a log plugin which integrates log4perl with the app and process everything in "logging" part of app's config-file and seeds Log::Log4perl's initialization. Is it clearer?

from starman.

miyagawa avatar miyagawa commented on July 17, 2024

Yes it's clearer. And it's unfortunate that the USR1 conflicts with what Unicorn's log rotation flags, so i might have to think about it. http://unicorn.bogomips.org/SIGNALS.html

(This is why I ask what you want to achieve with that change, so that it won't conflict with my design process.)

from starman.

wreis avatar wreis commented on July 17, 2024

Right. That is good discussion anyway and makes sense as base for documentation. :)

The good thing is that it does not need to be USR1 as it is totally parametrized. So, I could tell the log4perl to install another one (USR2 or whatever) and pass "--sig-passthrough USR2" to the server initialization.

from starman.

oschwald avatar oschwald commented on July 17, 2024

We also ran into a similar situation where it would be very useful to set sig_passthrough for an internal use of SIGUSR1. Would you accept a pull request to allow setting this?

from starman.

miyagawa avatar miyagawa commented on July 17, 2024

#111 added passing through Net::Server options with the --net_server- prefix (or via directly creating Starman::Server instance). Does that work for you?

from starman.

oschwald avatar oschwald commented on July 17, 2024

Yes, it does. Thanks! The prefix seems to be --net_server_ rather than --net_server- though.

from starman.

miyagawa avatar miyagawa commented on July 17, 2024

No, it is --net_server-. (It actually accepts both)

from starman.

oschwald avatar oschwald commented on July 17, 2024

Ah, ok. I just looked at the diff. I didn't realize Plack::Runner mangled the params before that point.

from starman.

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.