# Default Logging?

**URL:** <https://www.ruby-forum.com/t/default-logging/186370>\
**Category:** NGINX\
**Created:** [April 5, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/default-logging/186370 "2010-04-05T22:15:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Zulberti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@Tomas\_Zulberti](https://www.ruby-forum.com/u/Tomas_Zulberti)\
**Post date:** [April 5, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/default-logging/186370/1 "2010-04-05T22:15:15Z")

</div>

Hi. I am using nginx version 0.7.65, compiled with wsgi and geoip.  
The configuration tells the access log to save the file on /mnt.  
The problem is that for one that, there is no access log… An example  
of the configuration is as follows:

server {  
// …  
if (condition 1) {  
access\_log /mnt/file.txt  
// Other things things  
}

```
if (condition 2) {
  access_log /mnt/file2.txt
  // Other things things 2
}

if (condition 3) {
    // Other things things 3
}

```

}

The problem is that when condition 3 happens, it logs the combiend  
data to NGINX\_FOLDER/logs/access.log in the combined way… There  
isn’t any other access\_log (the ones on nginx.conf were deleted). So  
the question is: nginx always log to logs/access.log if there is no  
log?

Thanks in advance,  
Tomas Zulberti

pd: Sorry for my bad english…

---

<div class="post-metadata">

**Author:** ![Tomas\_Zulberti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7ea924/32.png) [@Tomas\_Zulberti](https://www.ruby-forum.com/u/Tomas_Zulberti)\
**Post date:** [April 6, 2010, 1:23am UTC](https://www.ruby-forum.com/t/default-logging/186370/2 "2010-04-06T01:23:08Z")

</div>

Hello!

On Mon, Apr 05, 2010 at 05:14:15PM -0300, Tomas Zulberti wrote:

> ```
> }
> 
> ```
> 
> The problem is that when condition 3 happens, it logs the combiend  
> data to NGINX\_FOLDER/logs/access.log in the combined way… There  
> isn’t any other access\_log (the ones on nginx.conf were deleted). So  
> the question is: nginx always log to logs/access.log if there is no  
> log?

By default nginx logs to file specified via --http-log-path  
configure argument. It defaults to logs/access.log under prefix  
in it’s turn.

See here for more details:

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Maxim D.
