Logging problem solved! Finally! 

Turns out it was just that web2py is using the file error.log for the wsgi 
output, while apache (httpd) is using error_log. In case this helps anyone 
else, on the homebrew version of httpd the log files are located in 
/opt/homebrew/var/log/httpd

So my local apache/mod_wsgi setup is working as expected now on mac

On Friday, December 23, 2022 at 1:55:04 PM UTC-5 Ian W. Scott wrote:

> Okay, my one remaining problem is logging output. I'm using the default 
> logging settings for web2py, and it usually is output in the apache error 
> log. But nothing appears in the error log for my mac installation of apache 
> (homebrew version of httpd). The apache server notices are showing up there 
> (e.g., for startup and shutdown) but none of the web2py output. Any 
> suggestions?
>
> I've solved the python import issues and web2py is running fine aside from 
> the logging. To fix the issue I had to:
>
> - add the location of my virtual environment to the WSGIDaemonProcess line 
> of my apache virtual host file:   python-home="/path/to/my/virtualenv"
> - install each of the missing python modules in that virtual environment
>
> Since I couldn't see logging output I figured out what was missing by 
> viewing each of the error ticket files in my web2py application's `errors` 
> folder. Time consuming, but did the trick.
>
> If you have any suggestions about getting the logging output I'd be very 
> grateful!
>
> Ian
>
> On Friday, December 23, 2022 at 3:36:02 AM UTC-5 Massimiliano wrote:
>
>> Sorry I didn't notice that you use apache. 
>> Can I ask you why?
>> In my dev machine I use the web2py internal server for simplicity.
>>
>> Anyway have you setup uwsgi to use the right python?
>>
>> Il giorno ven 23 dic 2022 alle ore 09:22 Massimiliano <[email protected]> 
>> ha scritto:
>>
>>> How do you start web2py?
>>>
>>> Il giorno ven 23 dic 2022 alle ore 03:39 Ian W. Scott <[email protected]> 
>>> ha scritto:
>>>
>>>> So it looks like it's a problem importing python modules. I'm using a 
>>>> virtualenv (pyenv) and web2py isn't finding the modules I installed for 
>>>> this version. There may be other issues too (since the logging isn't 
>>>> working!) but this is something I can fix... 
>>>>
>>>> On Thursday, December 22, 2022 at 8:43:56 PM UTC-5 Ian W. Scott wrote:
>>>>
>>>>> I've just moved to mac for my development and am trying to rebuild my 
>>>>> (formerly Linux) web2py dev environment. But I've hit a complete dead end:
>>>>> - web2py is generating 500 errors in the browser
>>>>> - there's no log output in the apache logs at all (so no error 
>>>>> messages)
>>>>> - none of the db table files are being created in the databases folder
>>>>> - a ticket number is being generated, but I can't access any tickets 
>>>>> (get a 500 error there too)
>>>>>
>>>>> Since I can't see any logging output I'm at a complete loss how to 
>>>>> debug this! 
>>>>>
>>>>> I'm using apache (homebrew httpd) with mod_wsgi and postgresql 
>>>>> (psycopg2) and they both seem to be working fine apart from web2py. I'm 
>>>>> pretty sure apache is configured properly and I can access files from the 
>>>>> "static" folder. But anything that goes through the db seems not to be 
>>>>> working at all.
>>>>>
>>>>> Any thoughts about how to start tackling this?
>>>>>
>>>>>
>>>>>  
>>>>>
>>>> -- 
>>>> Resources:
>>>> - http://web2py.com
>>>> - http://web2py.com/book (Documentation)
>>>> - http://github.com/web2py/web2py (Source code)
>>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "web2py-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/web2py/9483abf7-67d5-4407-a04d-bca90c418a28n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/web2py/9483abf7-67d5-4407-a04d-bca90c418a28n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> -- 
>>> Massimiliano
>>>
>>
>>
>> -- 
>> Massimiliano
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4ac7ff93-3c05-4a87-9cd9-3020389f11d6n%40googlegroups.com.

Reply via email to