litespeedtech / openlitespeed

Our high-performance, lightweight, open source HTTP server
https://openlitespeed.org
GNU General Public License v3.0
1.2k stars 194 forks source link

Accesslog not writing to stdout #273

Closed gazrobur closed 7 months ago

gazrobur commented 3 years ago

🐛 Bug report 🐛

Issue: Openlitespeed stopped writing accesslog to the console (only error logs are shown). (version 1.7.14)

Config:

errorlog /dev/console {
        logLevel             NOTICE
        debugLevel           0
        rollingSize          10M
        enableStderrLog      1
}

accesslog /dev/console {
        logFormat "%{X-Forwarded-For}i %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"
        rollingSize          10M    
        keepDays             30    
        compressArchive      0
        logReferer           1     
        logUserAgent         1
}

Before: In the previous version of openlitespeed (1.7.11) it just worked. My thought was that something changed what was not documented well.

Please help me to get rid of this problem

litespeedtech commented 3 years ago

It is for security reason, if you want to log to STDOUT, you can use stdout as file name.

GiuseppeIuculano commented 1 year ago

It is for security reason, if you want to log to STDOUT, you can use stdout as file name.

I tried this but it doesn't work , how writes log to stdout? this is important in a docker environment

psy0rz commented 7 months ago

i also have this problem, also see https://github.com/litespeedtech/ols-docker-env/issues/77

litespeedtech commented 7 months ago

accesslog stdout { ... should work now.